haven_all_levels | R Documentation |
Finish incomplete haven attributes substituting missings with values
haven_all_levels(data)
data |
haven labelled variable |
named vector
ds <- structure(c(1, 2, 3, 2, 10, 9),
labels = c(Unknown = 9, Refused = 10),
class = "haven_labelled"
)
haven::is.labelled(ds)
attributes(ds)
ds |> haven_all_levels()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.