R/radiant.R
round_df.RdRound doubles in a data.frame to a specified number of decimal places
round_df(tbl, dec = 3)Data frame
Number of decimals to show
Data frame with rounded doubles
data.frame(x = as.factor(c("a", "b")), y = c(1L, 2L), z = c(-0.0005, 3.1)) %>%
round_df(dec = 2)
#> x y z
#> 1 a 1 0.0
#> 2 b 2 3.1