Questions tagged [r-labelled]

19 questions
0
votes
2 answers

How to label values in a column based on a dataframe "dictionary"

I have data like this col1 33 924 33 12 924 and a dataframe like this col1 col2 12 "London" 33 "Paris" 924 "Singapore" How do I label the first dataframe based on the columns in the second dataframe using r's labelled? I know that…
Victor Nielsen
  • 443
  • 2
  • 14
0
votes
2 answers

Looping through labelles to create them in the same way

I really like the labelled package. I have an analysis that has tons of labels that I need to make. Instead of adding them one by one, is there a way to have it loop through all columns and to modify them in the same way. For example, if I wanted to…
DocProc
  • 103
  • 7
0
votes
0 answers

How to use a column as legend values in ggplot2 R and column attribute as title

I have this data: dput(padmin1) structure(list(q0005_0001 = structure(c(5, 4, 3, 3, 4, 4, NA, 3, NA, 4, 4, 4, 3, 4, 4, 4, 3, 4, 3, 4, NA, 3, 5, 4, NA, 4, 4, 3, 3, 4, 4, NA, 5, 5, 5, 3, 5, 4, 4, 4, 4, 4, 4, 5, 3, 3, 5, 2, 4, NA, 3, 4, 4, 5, 5, 3,…
0
votes
2 answers

ggplot accessing data labels rather than data values

I've imported some SPSS data into R, the data is labelled and I want to plot the label names, rather than the values. I've tried the below, but it prints the values library(labelled) library(tidyverse) cols <- c("White", "Red", "Black", "Green",…
pluke
  • 3,832
  • 5
  • 45
  • 68
1
2