powered by
Applying the rounding function to all numeric values of dataframe while excluding characters
roundx_df(df, dp)
a dataframe
decimal place to round to
roundx_df(data.frame(c(1.111, 1, 1.11), c(1, 1, 1), c("a", "b", "c")), 1)
Run the code above in your browser using DataLab