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().

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

Examples

#Don't include central value (median/mode) summary for numerical and integer #variables: setSummaries(numeric = defaultNumericSummaries(remove = "centralValue"), integer = defaultIntegerSummaries(remove = "centralValue"))
#> $character #> [1] "variableType" "countMissing" "uniqueValues" "centralValue" #> #> $factor #> [1] "variableType" "countMissing" "uniqueValues" "centralValue" #> #> $labelled #> [1] "variableType" "countMissing" "uniqueValues" "centralValue" #> #> $numeric #> [1] "variableType" "countMissing" "uniqueValues" "quartiles" "minMax" #> #> $integer #> [1] "variableType" "countMissing" "uniqueValues" "quartiles" "minMax" #> #> $logical #> [1] "variableType" "countMissing" "uniqueValues" "centralValue" #> #> $Date #> [1] "variableType" "countMissing" "uniqueValues" "centralValue" "minMax" #> [6] "quartiles" #>
#Used in a call to makeDataReport():
# NOT RUN { data(toyData) makeDataReport(toyData, setSummaries(numeric = defaultNumericSummaries(remove = "centralValue"), integer = defaultIntegerSummaries(remove = "centralValue")), replace = TRUE) # }