powered by
Format a data.frame with a specified number of decimal places
format_df(tbl, dec = NULL, perc = FALSE, mark = "", ...)
Data.frame
Number of decimals to show
Display numbers as percentages (TRUE or FALSE)
Thousand separator
Additional arguments for format_nr
Data.frame for printing
# NOT RUN { data.frame(x = c("a", "b"), y = c(1L, 2L), z = c(-0.0005, 3)) %>% format_df(dec = 4) data.frame(x = c(1L, 2L), y = c(0.05, 0.8)) %>% format_df(dec = 2, perc = TRUE) # }
Run the code above in your browser using DataLab