Learn R Programming

translateSPSS2R (version 1.0.0)

xpssVariableLabels: Modifies variable labels

Description

R implementation of the SPSS VARIABLE LABEL function. Changing the label of a variable. In the structure of xpss-data the variable label is an attribute of each variable.

Usage

xpssVariableLabels(x, variables = NULL, labels = NULL)

Arguments

x
a (non-empty) data.frame or input data of class "xpssFrame".
variables
atomic character or character vector with the names of the variable(s).
labels
atomic character of character vector with labels for the specified variables in variables. The labels are associated in order of appearence of the variables.

Value

Input Data with modified attribute variable label.

See Also

attributes attr xpssValueLabels

Examples

Run this code
data(fromXPSS)

daten <- xpssVariableLabels(fromXPSS, c("V4", "V7_1"), c("Label1", "Label2"))

Run the code above in your browser using DataLab