powered by
numeric
data.frame
This function rounds (only) the numeric columns of a data.frame.
round_data.frame(df, digits = 0)
A data.frame.
[data.frame] A data.frame.
[integer(1) | NULL ] The number of decimal places to be used.
integer(1)
NULL
Negative values are allowed, resulting in rounding to a power of ten.
Can be NULL to not round.
Other data.frame helpers: delete_columns_data.frame(), group_data.frame()
delete_columns_data.frame()
group_data.frame()
df <- data.frame("label" = c("A", "B"), "number" = rnorm(10)) round_data.frame(df, digits = 1)
Run the code above in your browser using DataLab