set_opts | R Documentation |
set_opts()
sets certain package options. To view these options, use show_opts()
.
For more advanced control and detailed customization, experienced users can
also employ options()
and show_options()
(refer to surveytable-options
for further information).
set_opts(
reset = NULL,
mode = NULL,
adj = NULL,
output = NULL,
file = NULL,
.file_temp = NULL,
count = NULL,
lpe = NULL,
drop_na = NULL,
max_levels = NULL
)
show_opts()
reset |
reset all options to their default values? |
mode |
|
adj |
adjustment to the Korn and Graubard confidence intervals for proportions. See
|
output |
specify how the output is printed: |
file |
file name (see |
.file_temp |
place |
count |
round counts to the nearest integer ( |
lpe |
identify low-precision estimates? |
drop_na |
drop missing values ( |
max_levels |
a categorical variable can have at most this many levels. Used to avoid printing huge tables. |
If you are not setting a particular option, leave it as NULL
.
mode
can be either "general"
or "NCHS"
and has the following meaning:
"general"
:
Round counts to the nearest integer – same as count = "int"
.
Do not look for low-precision estimates – same as lpe = FALSE
.
Percentage CI's: use standard Korn-Graubard CI's – same as adj = "none"
.
"nchs"
:
Round counts to the nearest 1,000 – same as count = "1k"
.
Identify low-precision estimates – same as lpe = TRUE
.
Percentage CI's: adjust Korn-Graubard CI's for the number of degrees of
freedom, matching the SUDAAN calculation – same as adj = "nchs"
. This
is appropriate for some, but not all, NCHS data systems. For some NCHS
data systems, such as NHIS, you might need to set adj
to one of the other values.
adj
specifies the adjustment to the Korn and Graubard confidence intervals for
proportions. See svyciprop_adjusted()
for details.
output
determines how the output is printed:
"auto"
(default): automatically select the table-making package, depending on the
destination (such as screen, HTML, or PDF / LaTeX).
"huxtable"
, "gt"
, or "kableExtra"
: use this table-making package. Be sure
that this package is installed.
"raw"
: unformatted / raw output. This is useful for getting lots of significant digits.
"Excel"
: print to an Excel workbook. Please specify the name of an Excel file using
the file
argument. Before using Excel printing, please be sure to install these
packages: openxlsx2
and mschart
.
"CSV"
: print to a comma-separated values (CSV) file. Please specify the name of a
CSV file using the file
argument.
(Nothing.)
Other options:
set_survey()
,
show_options()
,
surveytable-options
set_survey(namcs2019sv)
# Round counts to the nearest one thousand:
set_opts(count = "1k")
tab("AGER")
set_opts(count = "int")
show_opts()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.