set_opts {surveytable} | R Documentation |
Set certain options
Description
set_opts()
sets certain options. show_opts()
shows the options that have
been set. More advanced users can also use options()
and show_options()
for
more detailed control.
Usage
set_opts(
mode = NULL,
count = NULL,
lpe = NULL,
drop_na = NULL,
max_levels = NULL,
csv = NULL
)
show_opts()
Arguments
mode |
|
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. |
csv |
name of a CSV file or |
Details
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.
-
"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.
Value
(Nothing.)
See Also
Other options:
set_survey()
,
show_options()
,
surveytable-options
Examples
# Send output to a CSV file:
file_name = tempfile(fileext = ".csv")
suppressMessages( set_opts(csv = file_name) )
set_survey(namcs2019sv)
tab("AGER")
set_opts(csv = "") # Turn off CSV output
show_opts()