Debian Codegraph @

man/print.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/skim_print.R
3 \name{print}
4 \alias{print}
5 \alias{print.skim_df}
6 \alias{print.skim_list}
7 \alias{print.summary_skim_df}
8 \title{Print \code{skim} objects}
9 \usage{
10 \method{print}{skim_df}(
11 x,
12 include_summary = TRUE,
13 n = Inf,
14 width = Inf,
15 summary_rule_width = getOption("skimr_summary_rule_width", default = 40),
16 ...
17 )
18
19 \method{print}{skim_list}(x, n = Inf, width = Inf, ...)
20
21 \method{print}{summary_skim_df}(x, .summary_rule_width = 40, ...)
22 }
23 \arguments{
24 \item{x}{Object to format or print.}
25
26 \item{include_summary}{Whether a summary of the data frame should be printed}
27
28 \item{n}{Number of rows to show. If \code{NULL}, the default, will print all rows
29 if less than the \code{print_max} \link[pillar:pillar_options]{option}.
30 Otherwise, will print as many rows as specified by the
31 \code{print_min} \link[pillar:pillar_options]{option}.}
32
33 \item{width}{Width of text output to generate. This defaults to \code{NULL}, which
34 means use the \code{width} \link[pillar:pillar_options]{option}.}
35
36 \item{summary_rule_width}{Width of Data Summary cli rule, defaults to 40.}
37
38 \item{...}{Passed on to \link[pillar:tbl_format_setup]{pillar::tbl_format_setup()}}
39
40 \item{.summary_rule_width}{the width for the main rule above the summary.}
41 }
42 \description{
43 \code{skimr} has custom print methods for all supported objects. Default printing
44 methods for \code{knitr}/ \code{rmarkdown} documents is also provided.
45 }
46 \section{Methods (by class)}{
47 \itemize{
48 \item \code{print(skim_df)}: Print a skimmed data frame (\code{skim_df} from \code{\link[=skim]{skim()}}).
49
50 \item \code{print(skim_list)}: Print a \code{skim_list}, a list of \code{skim_df} objects.
51
52 \item \code{print(summary_skim_df)}: Print method for a \code{summary_skim_df} object.
53
54 }}
55 \section{Printing options}{
56
57
58 For better or for worse, \code{skimr} often produces more output than can fit in
59 the standard R console. Fortunately, most modern environments like RStudio
60 and Jupyter support more than 80 character outputs. Call
61 \code{options(width = 90)} to get a better experience with \code{skimr}.
62
63 The print methods in \code{skimr} wrap those in the \link[tibble:formatting]{tibble}
64 package. You can control printing behavior using the same global options.
65 }
66
67 \section{Behavior in \code{dplyr} pipelines}{
68
69
70 Printing a \code{skim_df} requires specific columns that might be dropped when
71 using \code{\link[dplyr:select]{dplyr::select()}} or \code{\link[dplyr:summarise]{dplyr::summarize()}} on a \code{skim_df}. In those
72 cases, this method falls back to \code{\link[tibble:formatting]{tibble::print.tbl()}}.
73 }
74
75 \section{Options for controlling print behavior}{
76
77
78 You can control the width rule line for the printed subtables with an option:
79 \code{skimr_table_header_width}.
80 }
81
82 \seealso{
83 \code{\link[tibble:trunc_mat]{tibble::trunc_mat()}} For a list of global options for customizing
84 print formatting. \code{\link[cli:num_ansi_colors]{cli::num_ansi_colors()}} for the variety of issues that
85 affect tibble's color support.
86 }