as_flextable.data.frame: Transform and summarise a 'data.frame' into a flextable...

View source: R/df_printer.R

as_flextable.data.frameR Documentation

Transform and summarise a 'data.frame' into a flextable Simple summary of a data.frame as a flextable

Description

It displays the first rows and shows the column types. If there is only one row, a simplified vertical table is produced.

Usage

## S3 method for class 'data.frame'
as_flextable(
  x,
  max_row = 10,
  split_colnames = FALSE,
  short_strings = FALSE,
  short_size = 35,
  short_suffix = "...",
  do_autofit = TRUE,
  show_coltype = TRUE,
  color_coltype = "#999999",
  ...
)

Arguments

x

a data.frame

max_row

The number of rows to print. Default to 10.

split_colnames

Should the column names be split (with non alpha-numeric characters). Default to FALSE.

short_strings

Should the character column be shorten. Default to FALSE.

short_size

Maximum length of character column if short_strings is TRUE. Default to 35.

short_suffix

Suffix to add when character values are shorten. Default to "...".

do_autofit

Use autofit() before rendering the table. Default to TRUE.

show_coltype

Show column types. Default to TRUE.

color_coltype

Color to use for column types. Default to "#999999".

...

unused arguments

See Also

Other as_flextable methods: as_flextable(), as_flextable.gam(), as_flextable.glm(), as_flextable.grouped_data(), as_flextable.htest(), as_flextable.kmeans(), as_flextable.lm(), as_flextable.merMod(), as_flextable.pam(), as_flextable.summarizor(), as_flextable.table(), as_flextable.tabular(), as_flextable.tabulator(), as_flextable.xtable()

Examples

as_flextable(mtcars)

davidgohel/flextable documentation built on April 18, 2024, 11:37 a.m.