invertingItems: invertItems

invertItemR Documentation

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

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.

Value

The dataframe with the specified items inverted.

Author(s)

Gjalt-Jorn Peters

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

See Also

invertItem

Examples


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


ufs documentation built on July 9, 2023, 6:07 p.m.