as.haven | R Documentation |
Convert declared labelled objects to haven labelled objects
as.haven(x, ...)
x |
A declared labelled vector |
... |
Other arguments used by various methods |
This is a function that reverses the process of as.declared()
, making
a round trip between declared
and haven_labelled_spss
classes.
A labelled vector of class "haven_labelled_spss".
x <- declared(
c(1:5, -1),
labels = c(Good = 1, Bad = 5, DK = -1),
na_values = -1
)
x
as.haven(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.