Learn R Programming

dataMaid (version 1.0.0)

setSummaries: Set summary arguments for makeDataReport

Description

This function is a tool for easily specifying the summaries argument of makeDataReport. Note that all available summary function options can be inspected by calling allSummaryFunctions().

Usage

setSummaries(character = defaultCharacterSummaries(),
  factor = defaultFactorSummaries(), labelled = defaultLabelledSummaries(),
  numeric = defaultNumericSummaries(), integer = defaultIntegerSummaries(),
  logical = defaultLogicalSummaries(), Date = defaultDateSummaries(),
  all = NULL)

Arguments

character

A character vector of function names to be used as summaries for character variables. The default options are available by calling defaultCharacterSummaries().

factor

A character vector of function names to be used as summaries for factor variables. The default options are available by calling defaultFactorSummaries().

labelled

A character vector of function names to be used as summaries for labelled variables. The default options are available by calling defaultLabelledSummaries().

numeric

A character vector of function names to be used as summaries for numeric variables. The default options are available by calling defaultNumericSummaries().

integer

A character vector of function names to be used as summaries for integer variables. The default options are available by calling defaultIntegerSummaries().

logical

A character vector of function names to be used as summaries for logical variables. The default options are available by calling defaultLogicalSummaries().

Date

A character vector of function names to be used as summaries for Date variables. The default options are available by calling defaultDateSummaries().

all

A character vector of function names to be used as summaries for all variables. Note that this overrules the choices made for specific variable types by using the other arguments.

Value

A list with one entry for each data class supported by makeDataReport. Each entry then contains a character vector of function names that are to be called as summaries for that variable type.

See Also

makeDataReport, allSummaryFunctions, defaultCharacterSummaries, defaultFactorSummaries, defaultLabelledSummaries, defaultNumericSummaries, defaultIntegerSummaries, defaultLogicalSummaries, defaultDateSummaries

Examples

Run this code
# NOT RUN {
#Don't include central value (median/mode) summary for numerical and integer
#variables:
  setSummaries(numeric = defaultNumericSummaries(remove = "centralValue"),
    integer = defaultIntegerSummaries(remove = "centralValue"))
  
     
#Used in a call to makeDataReport():
# }
# NOT RUN {
data(toyData)
makeDataReport(toyData, 
  setSummaries(numeric = defaultNumericSummaries(remove = "centralValue"),
    integer = defaultIntegerSummaries(remove = "centralValue")), replace = TRUE)
# }
# NOT RUN {
     
# }

Run the code above in your browser using DataLab