vallab: vallab: Read and modify SPSS value labels

Description Usage Arguments Value Examples

View source: R/haven.R

Description

Read and modify value labels for individual variables in a data frame read by read_sav in the 'haven' package.

Usage

1
vallab(x, ...)

Arguments

x

a variable which may be have a 'label' attribute

Value

the labels attribute of objects of class 'labelled'

Examples

1
2
3
4
5
6
7
## Not run: 
dat <- read_sav("SPSSfile.sav")
vallab(dat$Gender)
vallab(dat$Gender) <- c('Male','Female')  # changing from, say, 'M' and 'F'
write_sav(dat,"OUT.sav")

## End(Not run)

gmonette/HG documentation built on May 17, 2019, 7:25 a.m.