powered by
Tiny function just to round down a data frame for display in a table, ignoring non-numeric columns.
round_df(df, decimals = 2)
A data frame, with any numeric columns rounded to the specified amount.
A data frame to input
The number of decimal places to round to (default 2)
This function replaces the now-defunct roundDF() from COINr < v1.0.
roundDF()
round_df( as.data.frame(matrix(runif(20),10,2)), decimals = 3)
Run the code above in your browser using DataLab