2024-11-18 14:40:32 +01:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
% Please edit documentation in R/ds2dd_detailed.R
|
|
|
|
\name{haven_all_levels}
|
|
|
|
\alias{haven_all_levels}
|
|
|
|
\title{Finish incomplete haven attributes substituting missings with values}
|
|
|
|
\usage{
|
|
|
|
haven_all_levels(data)
|
|
|
|
}
|
|
|
|
\arguments{
|
|
|
|
\item{data}{haven labelled variable}
|
|
|
|
}
|
|
|
|
\value{
|
|
|
|
named vector
|
|
|
|
}
|
|
|
|
\description{
|
|
|
|
Finish incomplete haven attributes substituting missings with values
|
|
|
|
}
|
|
|
|
\examples{
|
|
|
|
ds <- structure(c(1, 2, 3, 2, 10, 9),
|
|
|
|
labels = c(Unknown = 9, Refused = 10),
|
|
|
|
class = "haven_labelled"
|
|
|
|
)
|
2024-11-19 12:54:26 +01:00
|
|
|
labelled::is.labelled(ds)
|
|
|
|
attributes(ds)
|
2024-11-18 14:40:32 +01:00
|
|
|
ds |> haven_all_levels()
|
|
|
|
}
|