atable (version 0.1.0)

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:

  • 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.

  • 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.

  • 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.

Details

These options control some aspects of the atable package.

For restoring the default values see atable_options_reset.

Examples

Run this code
# NOT RUN {
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 DataCamp Workspace