Description Usage Arguments Details Author(s) See Also Examples
View source: R/xpssValueLabels.R
R implementation of the SPSS VALUE LABEL
function. xpssValueLabels creates value labels for specific variables. The values of the label get stored in attributes of the variable.
1 2 |
x |
a (non-empty) data.frame or input data of class "xpssFrame". |
variables |
atomic character or character vector with the names of the variables. |
values |
atomic numeric or numeric vector containing the values of the variable. |
labels |
atomic character or character vector containing the variable labels. |
datevariables |
atomic date or date vector with the names of the date variables. |
datevalues |
atomic date or date vector containing the value of the date, the values has to be like the old date format. |
datelabels |
atomic character or character vector containing the date labels. |
The SPSS variables are stored at the variable itself.
In contrast to xpssAddValueLabels
, xpssValueLabels
does erase existing value labels.
If the value label for a specific variable already exists, all value labels for that variable get overwritten.
If the value label for a specific variable does not exist, the value label gets created and all existing value labels for that variable get deleted.
A variable can have the following attributes:
value.labels
, defined.MIS
, MIS
, varname
, variable.label
Andreas Wygrabek
xpssAddValueLabels
xpssVariableLabels
1 2 3 4 5 6 7 8 9 10 11 | data(fromXPSS)
temp <- xpssValueLabels(fromXPSS,
variables = "V1",
value = 1 ,
label = "Label1")
fromXPSS <- xpssAddValueLabels(fromXPSS,
variables = "V1",
values = c("A","B"),
labels = c("Label1","Label2"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.