atable (version 0.1.14)

atable_options: 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 [key]=[value] pairs to set options.

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 argument add_margins. See the help there.

  • colname_for_total: A 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_by: A 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_variable: A 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_observations: A 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_blocks: A 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_FALSE: A 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_SD: A 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_missing: A 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_to: A character length 1. Default is 'Latex'. Currently used in function atable.

  • colname_for_group: A 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_value: A 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_compact: A 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.numeric: Either 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.factor: Analog to argument statistics.numeric.

  • statistics.ordered: Analog to argument statistics.numeric.

  • two_sample_htest.numeric: Either 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.factor: Analog to argument two_sample_htest.numeric

  • two_sample_htest.ordered: Analog to argument two_sample_htest.numeric

  • multi_sample_htest.numeric: Either 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_htest: see the help there.

  • multi_sample_htest.factor: Analog to argument multi_sample_htest.numeric

  • multi_sample_htest.ordered: Analog to argument multi_sample_htest.numeric

  • format_statistics.statistics_numeric: Either 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_factor: Analog to argument format_statistics.statistics_numeric

  • format_tests.htest: Either 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_size: Analog to argument format_tests.htest

  • format_p_values: A 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_percent: A 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_numbers: A 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.

  • digits: 2. How many digits a number should have in the table. Used by format_percent and format_percent and passed to format.

  • get_alias.default: A 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.labelled: A 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_alias: A 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_character: A 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_compact: A Character with length 1. Passed to atable_compact. Value is " " for viewing in the console. Use "\quad" for Latex and intToUtf8(160) for Word.

  • indent: A logical with length 1. Passed to atable. Controls, if indent_data_frame is called.

  • format_statistics_compact.statistics_factor: A 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_factor: A 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

Details

These options control some aspects of the atable package.

For restoring the default values see atable_options_reset.

Examples

Run this code
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


Run the code above in your browser using DataLab