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)
character | A character vector of function names to be used as summaries for character
variables. The default options are available by calling |
---|---|
factor | A character vector of function names to be used as summaries for factor
variables. The default options are available by calling |
labelled | A character vector of function names to be used as summaries for labelled
variables. The default options are available by calling |
numeric | A character vector of function names to be used as summaries for numeric
variables. The default options are available by calling |
integer | A character vector of function names to be used as summaries for integer
variables. The default options are available by calling |
logical | A character vector of function names to be used as summaries for logical
variables. The default options are available by calling |
Date | A character vector of function names to be used as summaries for Date
variables. The default options are available by calling |
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. |
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.
makeDataReport
, allSummaryFunctions
,
defaultCharacterSummaries
,
defaultFactorSummaries
, defaultLabelledSummaries
,
defaultNumericSummaries
, defaultIntegerSummaries
,
defaultLogicalSummaries
, defaultDateSummaries
#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) # }