newMean: Computes the Mean of a Set of Variables

Description Usage Arguments Value Author(s) See Also

Description

Given a set of variables, some of which may need to be reverse-scored, this function returns a column vector mean of those variables after reverse-scoring those so designated.

Usage

1
newMean(data, variables = NULL, reversed = NULL, max = NULL, label)

Arguments

data

A data.frame containing the variables in both variables and reversed

variables

Variables to be retained in the dataset but that do not need to be reverse-scored

reversed

Variables to be reverse-scored

max

The maximum possible value for reversed. If the variables in reversed range from 1 to 7, max would be 7. Note that all the items must share the same maximum value.

label

Name to be given to the new mean variable.

Value

A named column vector equal to the mean of a combination of variables and reversed after the latter have been reverse-scored.

Author(s)

Bill Altermatt

See Also

revData, apply


DeducerAlpha documentation built on May 2, 2019, 4:53 p.m.