powered by
Returns a matrix or data.frame with the indicated items recoded.
recode(X, items = NULL, values = defaultValues)
The result is X for which columns items have been recoded.
X
items
matrix or data frame of numeric data containing the responses of nrow(X) respondents to ncol(X) items. Missing values are allowed
nrow(X)
ncol(X)
Vector of integers indicating the items to be recoded
Vector of possible item scores. By default the range of the observed values is taken
L. A. van der Ark L.A.vanderArk@uva.nl
DS14, twoway
DS14
twoway
data(DS14) # Handle missing data and recode negatively worded items X <- DS14[, 3 : 16] X <- twoway(X) X <- recode(X, c(1, 3)) head(X)
Run the code above in your browser using DataLab