View source: R/round_numeric.R
round_numeric | R Documentation |
round_numeric
is useful when many variables are contained within a
data frame and all numerical values want to be rounded without individual
naming.
round_numeric(df, round = 1)
factor_coerce(df)
df |
A data frame containing numeric variables. |
round |
Number of decimal places, used in |
Stuart K. Grange
# Round all numeric variables to two decimal places
## Not run:
data_tidy_round <- round_numeric(data_tidy, round = 2)
# or, make all numeric variables integers
data_tidy_integer <- round_numeric(data_tidy, round = 0)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.