round_if_num | R Documentation |
This function takes as it's input a dataframe and rounds all numeric variables to the number of digs supplied thus avoiding the error when applying 'round' to a dataframe that contains non-numeric variables
round_if_num(x, digs = 3, except = NULL)
x |
The dataset for which you want the numeric variables rounded |
digs |
the number of digits to round the numeric variables to |
except |
a vector of numeric variables to leave out of the rounding |
round_if_num()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.