![]() # change LaTeX default table environment kable(d1, format = "latex", caption = "My table", table.envir = "table*" ) # use the longtable package kable(matrix( 1000, ncol = 5 ), format = "latex", digits = 2, longtable = TRUE ) # use the booktabs package kable(mtcars, format = "latex", booktabs = TRUE ) Kable(d1, format = "html", caption = "Title of the table" ) Kable(d1, format = "latex", caption = "Title of the table" ) # more padding kable(d2, format = "pipe", padding = 2 ) # no inner padding kable(d2, format = "pipe", padding = 0 ) options( = '') toĮxamples about this function, including specific arguments according to the If you want to display them with other characters, you can set the Missing values ( NA) in the table are displayed as NA byĭefault. Other arguments (see Examples and References). That special characters will not trigger syntax errors in LaTeX or HTML. When escape = FALSE, you have to make sure list(big.mark = ',').īoolean whether to escape special characters when producing To disable the label,Ī list of arguments to be passed to format() By default, the label is obtainedįrom knitr::opts_current$get('label'). 'clc' becomesĬ('c', 'l', 'c'), unless the output format is LaTeX. If length(align) = 1L, the string will beĮxpanded to a vector of individual letters, e.g. By default or ifĪlign = NULL, numeric columns are right-aligned, and other columnsĪre left-aligned. By default, row namesĪre included if rownames(x) is neither NULL nor identical toĪ character vector of column names to be used in the table.Ĭolumn alignment: a character vector consisting of 'l' The number of digits for individual columns. This can also be a vector of length ncol(x), to set Maximum number of digits for numeric columns, passed to If format isĪ function, it must return a character string. The format value can alsoīe set in the global option. The value of this argument will be automatically determined if the function Simple tables), rst, jira, and org (Emacs Org-mode). Html, pipe (Pandoc's pipe tables), simple (Pandoc's For kables(), a list with each element being aĪ character string. For kable(), x is an R object, which is typically a
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |