View source: R/atable_options.R
| atable_options | R Documentation |
Set or get options for the atable-package via the settings package.
atable_options(...)
... |
Option names to retrieve option values or |
These options control some aspects of the atable package.
For restoring the default values see atable_options_reset.
The following options are supported:
add_marginsA logical with length 1, TRUE of FALSE. This is the default-value of atable's
argument add_margins. See the help there.
colname_for_totalA character with length 1. Default is 'Total'. This character will show up
in the results of atable when add_margins is TRUE and group_col is not NULL.
replace_NA_byA character with length 1, or NULL. Default is 'missing'.
Used in function replace_NA. This character will show up in the results of atable,
so it can be modified.
colname_for_variableA character with length 1. Default is 'variable___'.
Used in function add_name_to_tests and add_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_observationsA character with length 1. Default is 'Observations'.
Used in function add_observation_column.
This character will show up in the results of atable, so it can be modified.
There may be name clashes with user-supplied data.frames; so modification may be necessary.
colname_for_blocksA character with length 1. Default is 'block_name___'.
Used in function indent_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_FALSEA character of length 2. Default is c('yes', 'no').
Currently used in function statistics.logical (see statistics) to cast logical to factor.
TRUE is mapped to labels_TRUE_FALSE[1] and FALSE to labels_TRUE_FALSE[2].
This characters may show up in the results of atable, so it can be modified.
labels_Mean_SDA character length 1. Default is 'Mean (SD)'.
Currently used in function format_statistics as a name for the mean and standard deviation of
numeric variables. This character may show up in the results of atable, so it can be modified.
labels_valid_missingA character length 1. Default is 'valid (missing)'.
Currently used in function format_statistics as a name for the number of valid and missing values
of numeric variables. This character may show up in the results of atable, so it can be modified.
format_toA character length 1. Default is 'Latex'.
Currently used in function atable.
colname_for_groupA character of length 1. Default is 'Group'.
This character will show up in the results of atable.
This column will contain all values of DD[split_cols] and DD[target_cols].
colname_for_valueA character of length 1. Default is 'value'.
This character shows up in the results of atable when group_col is NULL.
The column will contain the results of the statistics.
colname_for_variable_compactA character of length 1. Default is intToUtf8(160), a non-breaking space.
This character will show up in the results of atable_compact as name of the first column.
statistics.numericEither NULL or a function. Default is NULL.
If a function, then it will replace atable:::statistics.numeric when atable is called.
The function must mimic statistics: see the help there.
statistics.factorAnalog to argument statistics.numeric.
statistics.orderedAnalog to argument statistics.numeric.
two_sample_htest.numericEither NULL or a function. Default is NULL.
If a function, then it will replace atable:::two_sample_htest.numeric when atable is called.
The function must mimic two_sample_htest: see the help there.
two_sample_htest.factorAnalog to argument two_sample_htest.numeric
two_sample_htest.orderedAnalog to argument two_sample_htest.numeric
multi_sample_htest.numericEither NULL or a function. Default is NULL.
If a function, then it will replace atable:::multi_sample_htest.numeric when atable is called.
The function must mimic multi_sample_htestsee the help there.
multi_sample_htest.factorAnalog to argument multi_sample_htest.numeric
multi_sample_htest.orderedAnalog to argument multi_sample_htest.numeric
format_statistics.statistics_numericEither NULL or a function. Default is NULL.
If a function, then it will replace atable:::format_statistics.statistics_numeric.
The function must mimic format_statistics: see the help there.
format_statistics.statistics_factorAnalog to argument format_statistics.statistics_numeric
format_tests.htestEither NULL or a function. Default is NULL.
If a function, then it will replace format_tests.htest.
The function must mimic format_tests: arguments are x and the ellipsis ... .
Result is a data.frame with 1 rows and unique colnames.
format_tests.htest_with_effect_sizeAnalog to argument format_tests.htest
format_p_valuesA function with one argument returning a character with same length as the argument.
This functions is called by format_tests to produce printable p-values.
format_percentA function with one argument returning a character with same length as the argument.
This functions is called by format_statistics for factors to produce printable percentages.
format_numbersA function with one argument returning a character with same length as the argument.
This functions is called by format_statistics and format_tests for number,
that are not p-values or percentages.
digitsHow many digits a number should have in the table. Default 2.
Used by format_percent and format_percent and passed to format.
get_alias.defaultA function with one argument x and ... returning a character or NULL.
This functions is called by get_alias and create_alias_mapping to retrieve alternative Variable names to print
in the table.
get_alias.labelledA function with one argument x and ..., that must return a character.
This functions is called by get_alias on the columns that have class labelled.
modifiy_colnames_without_aliasA function with one argument x and ... returning a character.
This functions is called by create_alias_mapping on the columns that have is.NULL(get_alias(x)).
Replaces underscores by blanks and then calls trimws.
indent_characterA Character with length 1. Passed to indent_data_frame. Every option of format_to
has a corresponding indent_character. See the help of atable for these options.
indent_character_compactA Character with length 1. Passed to atable_compact.
Value is " " for viewing in the console. Use "\quad" for Latex and intToUtf8(160) for Word.
indentA logical with length 1. Passed to atable. Controls, if indent_data_frame is called.
format_statistics_compact.statistics_factorA function with the same Properties as format_statistics. Used as a
default value for atable_compact
format_statistics_compact.statistics_numeric A function with the same Properties as format_statistics. Used as a
default value for atable_compact
format_statistics_longitudinal.statistics_factorA function with the same Properties as format_statistics. Used as a
default value for atable_longitudinal
format_statistics_longitudinal.statistics_numeric A function with the same Properties as format_statistics. Used as a
default value for atable_longitudinal
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.