To list all summarytools
global options, call without arguments. To
display the value of one or several options, enter the name(s) of the
option(s) in a character vector as sole argument. To reset all
options, use single unnamed argument ‘reset’ or 0
.
st_options(option = NULL, value = NULL, style = "simple",
plain.ascii = TRUE, round.digits = 2, headings = TRUE,
footnote = "default", display.labels = TRUE, bootstrap.css = TRUE,
custom.css = NA, escape.pipe = FALSE, freq.cumul = TRUE,
freq.totals = TRUE, freq.report.nas = TRUE, ctable.prop = "r",
ctable.totals = TRUE, descr.stats = "all", descr.transpose = FALSE,
descr.silent = FALSE, dfSummary.style = "multiline",
dfSummary.varnumbers = TRUE, dfSummary.labels.col = TRUE,
dfSummary.valid.col = TRUE, dfSummary.na.col = TRUE,
dfSummary.graph.col = TRUE, dfSummary.graph.magnif = 1,
dfSummary.silent = FALSE, tmp.img.dir = NA,
subtitle.emphasis = TRUE, lang = "en", omit.headings = !headings)
option(s) name(s) to query (optional). Can be a single string or a vector of strings to query multiple values.
The value you wish to assign to the option specified in the
first argument. This is for backward-compatibility, as all options can now
be set via their own parameter. That is, instead of
st_options('plain.ascii', FALSE))
, use
st_options(plain.ascii = FALSE)
.
Character. One of “simple” (default), “rmarkdown”,
or “grid”. Does not apply to dfSummary
.
Logical. TRUE
by default. Set to FALSE
when
using summarytools with a rendering tool such as knitr
or when
creating rmarkdown output files to be converted with Pandoc. Note however
that its value will automatically be set to FALSE
whenever
style
is set to “rmarkdown”).
Numeric. Defaults to 2
.
Character. When the default value “default” is used,
the package name & version, as well as the R version number are displayed
below html outputs. Set no NA
to omit the footnote, or
provide a custom string. Applies only to html outputs.
Logical. TRUE
by default. Set to FALSE
to
omit data frame and variable labels in the headings section.
Logical. Specifies whether to Include
Bootstrap css in html reports head section outputs.
Defaults to TRUE
. Set to FALSE
when using the “render”
method inside a shiny
app to avoid interacting with the app's
layout.
Character. Path to an additional, user-provided, CSS file.
NA
by default.
Logical. Set to TRUE
if Pandoc conversion is your
goal and you have unsatisfying results with grid or multiline tables.
FALSE
by default.
Logical. Corresponds to the cumul
parameter of
freq
. TRUE
by default.
Logical. Corresponds to the totals
parameter of
freq
. TRUE
by default.
Logical. Corresponds to the display.nas
parameter of freq()
. TRUE
by default.
Character. Corresponds to the prop
parameter of
ctable
. Defaults to “r” (row).
Logical. Corresponds to the totals
parameter of
ctable
. TRUE
by default.
Character. Corresponds to the stats
parameter of
descr
. Defaults to “all”.
Logical. Corresponds to the transpose
parameter
of descr
. FALSE
by default.
Logical. Hide console messages. FALSE
by default.
Character. “multiline” by default. Set to “grid” for Rmarkdown documents.
Logical. In dfSummary
, display
variable numbers in the first column. Defaults to TRUE
.
Logical. In dfSummary
, display
variable labels Defaults to TRUE
.
Logical. In dfSummary
, include
column indicating count and proportion of valid (non-missing). TRUE
by default.
Logical. In dfSummary
, include column
indicating count and proportion of missing (NA) values. TRUE
by
default.
Logical. Display barplots / histograms column in
dfSummary
html reports. TRUE
by default.
Numeric. Magnification factor, useful if
dfSummary
graphs show up too large (then use a value between
0 and 1) or too small (use a value > 1). Must be positive. Default to
1
.
Logical. Hide console messages. FALSE
by
default.
Character. Directory used to store temporary images. See
Details section of dfSummary
. NA
by default.
Logical. Controls the formatting of the
“subtitle” (the data frame or variable name, depending
on context. When TRUE
(default), “h4” is used, while with
FALSE
, “bold” / “strong” is used. Hence the default
value gives it stronger emphasis.
Character. A 2-letter code for the language to use in the produced outputs. Currently available languages are: ‘en’, ‘fr’.
Logical. Deprecated. Use headings
instead.
To learn more about summarytools options, see the GitHub project's page.
# NOT RUN {
# show all summarytools global options
st_options()
# show a specific option
st_options("round.digits")
# show two (or more) options
st_options(c("plain.ascii", "style", "footnote"))
# set one option
st_options(plain.ascii = FALSE)
# set one options, legacy way
st_options("plain.ascii", FALSE)
# set several options
st_options(plain.ascii = FALSE,
style = "rmarkdown",
footnote = NA)
# reset all
st_options('reset')
# ... or
st_options(0)
# }
Run the code above in your browser using DataLab