Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

knit_print

Provide a default printing method for knitr.


Description

Instead of standard R output, knitr and RMarkdown documents will have formatted knitr::kable() output on return. You can disable this by setting the chunk option render = normal_print.

Usage

## S3 method for class 'skim_df'
knit_print(x, options = NULL, ...)

## S3 method for class 'skim_list'
knit_print(x, options = NULL, ...)

## S3 method for class 'one_skim_df'
knit_print(x, options = NULL, ...)

## S3 method for class 'summary_skim_df'
knit_print(x, options = NULL, ...)

Arguments

x

An R object to be printed

options

Options passed into the print function.

...

Additional arguments passed to the S3 method. Currently ignored, except two optional arguments options and inline; see the references below.

Details

The summary statistics for the original data frame can be disabled by setting the knitr chunk option skimr_include_summary = FALSE. See knitr::opts_chunk for more information. You can change the number of digits shown in the printed table with the skimr_digits chunk option.

Alternatively, you can call collapse() or yank() to get the particular skim_df objects and format them however you like. One warning though. Because histograms contain unicode characters, they can have unexpected print results, as R as varying levels of unicode support. This affects Windows users most commonly. Call vignette("Using_fonts") for more details.

Value

A knit_asis object. Which is used by knitr when rendered.

Methods (by class)

  • skim_df: Default knitr print for skim_df objects.

  • skim_list: Default knitr print for a skim_list.

  • one_skim_df: Default knitr print within a partitioned skim_df.

  • summary_skim_df: Default knitr print for skim_df summaries.

See Also


skimr

Compact and Flexible Summaries of Data

v2.1.3
GPL-3
Authors
Elin Waring [cre, aut], Michael Quinn [aut], Amelia McNamara [aut], Eduardo Arino de la Rubia [aut], Hao Zhu [aut], Julia Lowndes [ctb], Shannon Ellis [aut], Hope McLeod [ctb], Hadley Wickham [ctb], Kirill Müller [ctb], RStudio, Inc. [cph] (Spark functions), Connor Kirkpatrick [ctb], Scott Brenstuhl [ctb], Patrick Schratz [ctb], lbusett [ctb], Mikko Korpela [ctb], Jennifer Thompson [ctb], Harris McGehee [ctb], Mark Roepke [ctb], Patrick Kennedy [ctb], Daniel Possenriede [ctb], David Zimmermann [ctb], Kyle Butts [ctb], Bastian Torges [ctb], Rick Saporta [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.