Learn R Programming

ufs (version 0.5.12)

invertItem: invertItems

Description

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

Usage

invertItem(item, fullRange = NULL, ignorePreviousInversion = FALSE)

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

Value

The dataframe with the specified items inverted.

Arguments

item

The vector to invert.

fullRange

The full range; will otherwise be derived from the vector.

ignorePreviousInversion

Whether to avoid inverting items that were already inverted.

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.

Author

Gjalt-Jorn Peters

Maintainer: Gjalt-Jorn Peters gjalt-jorn@userfriendlyscience.com

See Also

invertItem

Examples

Run this code

invertItems(mtcars, c('cyl'));

Run the code above in your browser using DataLab