Kable

Automatic output format in Rmarkdown

I am writing a Rmarkdown document with plenty of tables, and I want them in a decent format, e.g. kable. However I don’t want to format them one by one. For example, I have created the following data frame in dplyr. library(dplyr) data("iris") iris %>% group_by(Species) %>% summarise(n = n()) %>% arrange(desc(n)) ## # A tibble: 3 x 2 ## Species n ## <fctr> <int> ## 1 setosa 50 ## 2 versicolor 50 ## 3 virginica 50 One solution to the output format of this data frame would be to name it as an object in R, and then give it a format by using the kable function.
UpDog logo Host your own website for free with UpDog.