dataMaid (version 1.4.0)

setVisuals: Set visual arguments for makeDataReport

Description

This function is a tool for easily specifying the visuals argument of makeDataReport. Note that only a single visual function can be provided for each variable type. If more than one is supplied, only the first one is used. The default is to use a single visual function for all variable types (as specified in the argument all), but class-specific choices of visual functions can also be used. Note that class-specific arguments overwrites the contents of all. Note that all available visual function options can be inspected by calling allVisualFunctions().

Usage

setVisuals(
  character = NULL,
  factor = NULL,
  labelled = NULL,
  haven_labelled = NULL,
  numeric = NULL,
  integer = NULL,
  logical = NULL,
  Date = NULL,
  all = "standardVisual"
)

Arguments

character

A function name (character string) to be used as the visual function for character variables. If NULL (the default) the argument is ignored and the contents of the all argument is used instead.

factor

A function name (character string) to be used as the visual function for factor variables. If NULL (the default) the argument is ignored and the contents of the all argument is used instead.

labelled

A function name (character string) to be used as the visual function for labelled variables. If NULL (the default) the argument is ignored and the contents of the all argument is used instead.

haven_labelled

A function name (character string) to be used as the visual function for haven_labelled variables. If NULL (the default) the argument is ignored and the contents of the all argument is used instead.

numeric

A function name (character string) to be used as the visual function for numeric variables. If NULL (the default) the argument is ignored and the contents of the all argument is used instead.

integer

A function name (character string) to be used as the visual function for integer variables. If NULL (the default) the argument is ignored and the contents of the all argument is used instead.

logical

A function name (character string) to be used as the visual function for logical variables. If NULL (the default) the argument is ignored and the contents of the all argument is used instead.

Date

A function name (character string) to be used as the visual function for Date variables. If NULL (the default) the argument is ignored and the contents of the all argument is used instead.

all

A function name (character string) to be used as the visual function for all variables.

Value

A list with one entry for each data class supported by makeDataReport. Each entry then contains a character string with a function name that is to be called as the visual function for that variable type.

See Also

makeDataReport, allVisualFunctions

Examples

Run this code
# NOT RUN {
#Set visual type to basicVisual for all variable types:
  setVisuals(all = "basicVisual")
     
#Used in a call to makeDataReport():
# }
# NOT RUN {
data(toyData)
makeDataReport(toyData, visuals = setVisuals(all = "basicVisual"), replace = TRUE)
# }
# NOT RUN {
          
# }

Run the code above in your browser using DataCamp Workspace