Learn R Programming

userfriendlyscience (version 0.7.2)

invertItems: invertItems

Description

Inverts items (as in, in a questionnaire), by calling invertItem on all relevant items.

Usage

invertItems(dat, items = NULL, ...)

Arguments

dat

The dataframe containing the variables to invert.

items

The names or indices of the variables to invert. If not supplied (i.e. NULL), all variables in the dataframe will be inverted.

Arguments (parameters) passed on to data.frame when recreating that after having used lapply.

Value

The dataframe with the specified items inverted.

See Also

invertItem

Examples

Run this code
# NOT RUN {
invertItems(mtcars, c('cyl'));
# }

Run the code above in your browser using DataLab