1

I have an object of the class "tbl_df", from an imported spss-File (package haven).

I work with an R-Markdown file. When I access a certain variable of my dataframe data$question10, in the console it shows the vector of values (all 1 and 0), but the last line says "Labels:" not actually listing any labels. But in the R-Markdown output I get a summary of the number of zeros and ones.

Output in R Markdown

There it also shows the labels. How can I access these labels in a variable?

camille
  • 13,812
  • 10
  • 29
  • 45
Zahra
  • 11
  • 1
  • [See here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on making an R question that folks can help with. That includes a sample of data, all necessary code, and a clear explanation of what you're trying to do and what hasn't worked. – camille Nov 21 '19 at 19:05
  • Does this answer your question: https://stackoverflow.com/questions/48818985/variable-labels-in-the-r-package-haven-with-spss – ravic_ Nov 21 '19 at 19:09

0 Answers0