How to keep labels of var names and values when opening Stata data?

Dear Community,

I want to open a dataset in stata format in R. Opening works, but labels for variable names and values are not transferred.

Can anybody give me a hint, what I need to do so that labels are kept? Or is there another package than haven that works better for opening stata data?

I used bot these codes, both did not transfer the labelling:

a) pp14p <- read_dta("data.dta")

b) read_stata(
"data.dta",
encoding = NULL,
col_select = NULL,
skip = 0,
n_max = Inf,
.name_repair = "unique"
)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.