library(tidyverse) library(knitr) library(kableExtra)
simple_df_one_column <- data.frame( text = paste0('TEXT ', seq(1, 6)) ) simple_df_one_column_math <- data.frame( math = paste0('$\\text{Math:} x = ', seq(1, 6), '$ TEXT') ) simple_df_multi_columns <- data.frame( text = paste0('TEXT ', seq(1, 6)), desc = paste0('DESCRIPTION ', seq(1, 6)) ) simple_df_multi_columns_math <- data.frame( text = paste0('TEXT ', seq(1, 6)), math = paste0('$\\text{Math:} x = ', seq(1, 6), '$ TEXT') ) simple_df_longtable_one_column <- data.frame( text = paste0('TEXT ', seq(1, 50)) ) simple_df_longtable_one_column_math <- data.frame( math = paste0('$\\text{Math:} x = ', seq(1, 50), '$ TEXT') ) simple_df_longtable_multi_columns <- data.frame( text = paste0('TEXT ', seq(1, 50)), desc = paste0('DESCRIPTION ', seq(1, 50)) ) simple_df_longtable_multi_columns_math <- data.frame( text = paste0('TEXT ', seq(1, 50)), math = paste0('$\\text{Math:} x = ', seq(1, 50), '$ TEXT') )
simple_df_one_column %>% kable("latex", escape = F, booktabs = T) %>% kable_styling(latex_options = c('striped'))
simple_df_one_column %>% kable("latex", escape = F, booktabs = T, col.names = NULL) %>% kable_styling(latex_options = c('striped'))
simple_df_one_column_math %>% kable("latex", escape = F, booktabs = T) %>% kable_styling(latex_options = c('striped'))
simple_df_one_column_math %>% kable("latex", escape = F, booktabs = T, col.names = NULL) %>% kable_styling(latex_options = c('striped'))
simple_df_multi_columns %>% kable("latex", escape = F, booktabs = T) %>% kable_styling(latex_options = c('striped'))
simple_df_multi_columns %>% kable("latex", escape = F, booktabs = T, col.names = NULL) %>% kable_styling(latex_options = c('striped'))
simple_df_multi_columns_math %>% kable("latex", escape = F, booktabs = T) %>% kable_styling(latex_options = c('striped'))
simple_df_multi_columns_math %>% kable("latex", escape = F, booktabs = T, col.names = NULL) %>% kable_styling(latex_options = c('striped'))
simple_df_longtable_one_column %>% kable("latex", caption = 'Long Table with One Column', escape = F, booktabs = T, longtable = T) %>% kable_styling(latex_options = c('striped', 'repeat_header'))
simple_df_longtable_one_column %>% kable("latex", caption = 'Long Table with One Column without Colnames', escape = F, booktabs = T, longtable = T, col.names = NULL) %>% kable_styling(latex_options = c('striped', 'repeat_header'))
simple_df_longtable_one_column_math %>% kable("latex", caption = 'Long Table with One Column', escape = F, booktabs = T, longtable = T) %>% kable_styling(latex_options = c('striped', 'repeat_header'))
simple_df_longtable_one_column_math %>% kable("latex", caption = 'Long Table with One Column without Colnames', escape = F, booktabs = T, longtable = T, col.names = NULL) %>% kable_styling(latex_options = c('striped', 'repeat_header'))
simple_df_longtable_multi_columns %>% kable("latex", caption = 'Long Table with One Column', escape = F, booktabs = T, longtable = T) %>% kable_styling(latex_options = c('striped', 'repeat_header'))
simple_df_longtable_multi_columns %>% kable("latex", caption = 'Long Table with One Column without Colnames', escape = F, booktabs = T, longtable = T, col.names = NULL) %>% kable_styling(latex_options = c('striped', 'repeat_header'))
simple_df_longtable_multi_columns_math %>% kable("latex", caption = 'Long Table with One Column', escape = F, booktabs = T, longtable = T) %>% kable_styling(latex_options = c('striped', 'repeat_header'))
simple_df_longtable_multi_columns_math %>% kable("latex", caption = 'Long Table with One Column without Colnames', escape = F, booktabs = T, longtable = T, col.names = NULL) %>% kable_styling(latex_options = c('striped', 'repeat_header'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.