magic_table_numeric: Magic Table

Description Usage Arguments Value

View source: R/magic_table.R

Description

magic_table_numeric creates a magic table object from a data.frame-type object when the input variables are a set of numeric variables.

Usage

1
2
3
magic_table_numeric(dataset, vars, var_labels = NULL, stat_func, stat_labels,
  condvar_wide = NULL, condvar_wide_labels = NULL, condvar_long = NULL,
  condvar_long_labels = NULL, ...)

Arguments

dataset

a data.frame object, or object that can be coerced to a data.frame.

vars

a vector of character strings containing the names of the variables for which summary statistics should be computed.

var_labels

a vector of character strings containing the labels for the variables contained in vars.

stat_func

a function for calculating the summary statistics for the variables specified in vars.

condvar_wide

a character string indicating a variable in dataset for wide conditioning, i.e. within-group statistics are added as extra columns.

condvar_wide_labels

a character vector containing the labels for the different values of condvar_wide.

condvar_long

a character string indicating a variable in dataset for long conditioning, i.e. within-group statistics are added as extra rows.

condvar_long_labels

a character vector containing the labels for the different values of condvar_long.

...

additional variables to be passed to stat_func.

categorical

a logical value indicating whether magic_table_numeric or magic_table_categorical should be called. If NULL (default), then magic_table will select one based on the class of the variables contained in vars.

Value

a list containing tables of summary statistics for the specified variables.


Scott-Coggeshall/magictable documentation built on July 30, 2020, 2:19 a.m.