atable_options {atable} | R Documentation |
Set or get options
Description
Set or get options for the atable-package via the settings
package.
Usage
atable_options(...)
Arguments
... |
Option names to retrieve option values or |
Details
These options control some aspects of the atable package.
For restoring the default values see atable_options_reset
.
Supported options
The following options are supported:
add_margins
: A logical with length 1, TRUE of FALSE. This is the default-value of atable's argumentadd_margins
. See the help there.colname_for_total
: A character with length 1. Default is'Total'
. This character will show up in the results ofatable
whenadd_margins
isTRUE
andgroup_col
is notNULL
.replace_NA_by
: A character with length 1, orNULL
. Default is'missing'
. Used in functionreplace_NA
. This character will show up in the results ofatable
, so it can be modified.colname_for_variable
: A character with length 1. Default is'variable___'
. Used in functionadd_name_to_tests
andadd_name_to_statistics
. This character will not show up in the results and is only used internally for intermediate data.frames. There may be name clashes with user-supplied data.frames; so modification may be necessary.colname_for_observations
: A character with length 1. Default is'Observations'
. Used in functionadd_observation_column
. This character will show up in the results ofatable
, so it can be modified. There may be name clashes with user-supplied data.frames; so modification may be necessary.colname_for_blocks
: A character with length 1. Default is'block_name___'
. Used in functionindent_data_frame_with_blocks
. This character will not show up in the results and is only used internally for intermediate data.frames. There may be name clashes with user-supplied data.frames; so modification may be necessary.labels_TRUE_FALSE
: A character of length 2. Default isc('yes', 'no')
. Currently used in functionstatistics.logical
(seestatistics
) to cast logical to factor.TRUE
is mapped tolabels_TRUE_FALSE[1]
andFALSE
tolabels_TRUE_FALSE[2]
. This characters may show up in the results ofatable
, so it can be modified.labels_Mean_SD
: A character length 1. Default is'Mean (SD)'
. Currently used in functionformat_statistics
as a name for the mean and standard deviation of numeric variables. This character may show up in the results ofatable
, so it can be modified.labels_valid_missing
: A character length 1. Default is'valid (missing)'
. Currently used in functionformat_statistics
as a name for the number of valid and missing values of numeric variables. This character may show up in the results ofatable
, so it can be modified.format_to
: A character length 1. Default is'Latex'
. Currently used in functionatable
.colname_for_group
: A character of length 1. Default is'Group'
. This character will show up in the results ofatable
. This column will contain all values ofDD[split_cols]
andDD[target_cols]
.colname_for_value
: A character of length 1. Default is'value'
. This character shows up in the results ofatable
whengroup_col
isNULL
. The column will contain the results of thestatistics
.colname_for_variable_compact
: A character of length 1. Default isintToUtf8(160)
, a non-breaking space. This character will show up in the results ofatable_compact
as name of the first column.statistics.numeric
: EitherNULL
or a function. Default isNULL
. If a function, then it will replaceatable:::statistics.numeric
when atable is called. The function must mimicstatistics
: see the help there.statistics.factor
: Analog to argument statistics.numeric.statistics.ordered
: Analog to argument statistics.numeric.two_sample_htest.numeric
: EitherNULL
or a function. Default isNULL
. If a function, then it will replaceatable:::two_sample_htest.numeric
when atable is called. The function must mimictwo_sample_htest
: see the help there.two_sample_htest.factor
: Analog to argument two_sample_htest.numerictwo_sample_htest.ordered
: Analog to argument two_sample_htest.numericmulti_sample_htest.numeric
: EitherNULL
or a function. Default isNULL
. If a function, then it will replaceatable:::multi_sample_htest.numeric
when atable is called. The function must mimicmulti_sample_htest
: see the help there.multi_sample_htest.factor
: Analog to argument multi_sample_htest.numericmulti_sample_htest.ordered
: Analog to argument multi_sample_htest.numericformat_statistics.statistics_numeric
: EitherNULL
or a function. Default isNULL
. If a function, then it will replaceatable:::format_statistics.statistics_numeric
. The function must mimicformat_statistics
: see the help there.format_statistics.statistics_factor
: Analog to argument format_statistics.statistics_numericformat_tests.htest
: EitherNULL
or a function. Default isNULL
. If a function, then it will replaceformat_tests.htest
. The function must mimicformat_tests
: arguments arex
and the ellipsis ... . Result is a data.frame with 1 rows and unique colnames.format_tests.htest_with_effect_size
: Analog to argument format_tests.htestformat_p_values
: A function with one argument returning a character with same length as the argument. This functions is called byformat_tests
to produce printable p-values.format_percent
: A function with one argument returning a character with same length as the argument. This functions is called byformat_statistics
for factors to produce printable percentages.format_numbers
: A function with one argument returning a character with same length as the argument. This functions is called byformat_statistics
andformat_tests
for number, that are not p-values or percentages.digits
: 2. How many digits a number should have in the table. Used byformat_percent
andformat_percent
and passed toformat
.get_alias.default
: A function with one argumentx
and...
returning a character orNULL
. This functions is called byget_alias
andcreate_alias_mapping
to retrieve alternative Variable names to print in the table.get_alias.labelled
: A function with one argumentx
and...
, that must return a character. This functions is called byget_alias
on the columns that have class labelled.modifiy_colnames_without_alias
: A function with one argumentx
and...
returning a character. This functions is called bycreate_alias_mapping
on the columns that haveis.NULL(get_alias(x))
. Replaces underscores by blanks and then callstrimws
.indent_character
: A Character with length 1. Passed toindent_data_frame
. Every option offormat_to
has a corresponding indent_character. See the help ofatable
for these options.indent_character_compact
: A Character with length 1. Passed toatable_compact
. Value is" "
for viewing in the console. Use"\quad"
for Latex andintToUtf8(160)
for Word.indent
: A logical with length 1. Passed toatable
. Controls, if indent_data_frame is called.format_statistics_compact.statistics_factor
: A function with the same Properties asformat_statistics
. Used as a default value foratable_compact
format_statistics_compact.statistics_numeric
: A function with the same Properties asformat_statistics
. Used as a default value foratable_compact
format_statistics_longitudinal.statistics_factor
: A function with the same Properties asformat_statistics
. Used as a default value foratable_longitudinal
format_statistics_longitudinal.statistics_numeric
: A function with the same Properties asformat_statistics
. Used as a default value foratable_longitudinal
Examples
atable_options() # show all options
atable_options('replace_NA_by' = 'no value') # set a new value
atable_options('replace_NA_by') # return the new value