as.haven {declared} | R Documentation |
Coerce to haven / labelled objects
Description
Convert declared labelled objects to haven labelled objects
Usage
as.haven(x, ...)
Arguments
x |
A declared labelled vector |
... |
Other arguments used by various methods |
Details
This is a function that reverses the process of as.declared()
, making
a round trip between declared
and haven_labelled_spss
classes.
Value
A labelled vector of class "haven_labelled_spss".
Examples
x <- declared(
c(1:5, -1),
labels = c(Good = 1, Bad = 5, DK = -1),
na_values = -1
)
x
as.haven(x)
[Package declared version 0.24 Index]