I imported a .dta (Stata file format) into R, but it looks like the variable labels did not get imported along with the variable names.
- Using
foreign::read.dta
, I triedlabels(df)
, but that only gives me the variable names; andstr(df$var)
is also is not telling me label. - Using a function from the
haven
package,attributes(df$var)
gives me levels and class, but not variable label.
Am I missing something here?