Learn R Programming

skimr (version 1.0.7)

kable: Create tables in LaTeX, HTML, Markdown and reStructuredText

Description

This is a very simple table generator. It is simple by design. It is not intended to replace any other R packages for making tables.

Usage

kable(x, format = NULL, digits = getOption("digits"), row.names = NA,
  col.names = NA, align, caption = NULL, format.args = list(),
  escape = TRUE, ...)

# S3 method for skim_df kable(x, format = NULL, digits = getOption("digits"), row.names = NA, col.names = NA, align = NULL, caption = NULL, format.args = list(), escape = TRUE, ...)

# S3 method for summary_skim_df kable(x, ...)

Arguments

x

An R object, typically a matrix or data frame.

format

A character string. Possible values are latex, html, markdown, pandoc, and rst; this will be automatically determined if the function is called within knitr; it can also be set in the global option knitr.table.format. If format is a function, it must return a character string.

digits

Maximum number of digits for numeric columns, passed to round(). This can also be a vector of length ncol(x), to set the number of digits for individual columns.

row.names

Logical: whether to include row names. By default, row names are included if rownames(x) is neither NULL nor identical to 1:nrow(x).

col.names

A character vector of column names to be used in the table.

align

Column alignment: a character vector consisting of 'l' (left), 'c' (center) and/or 'r' (right). By default or if align = NULL, numeric columns are right-aligned, and other columns are left-aligned. If length(align) == 1L, the string will be expanded to a vector of individual letters, e.g. 'clc' becomes c('c', 'l', 'c'), unless the output format is LaTeX.

caption

The table caption.

format.args

A list of arguments to be passed to format() to format table values, e.g. list(big.mark = ',').

escape

Boolean; whether to escape special characters when producing HTML or LaTeX tables.

...

Other arguments (see Examples).

Value

The original skim_df object.

Methods (by class)

  • skim_df: Produce kable output of a skimmed data frame

  • summary_skim_df: Kable method for a summary_skim_df object

See Also

knitr::kable()