set_varl | R Documentation |
A pipe-workflow optimised method to set variable labels.
set_varl(x, variable_label)
x |
Variable to assign variable labels to |
variable_label |
String vector to be assigned as the variable label |
Other Labels:
set_vall()
library(tibble)
library(dplyr)
library(magrittr)
df <-
tibble(RESPID=1:1000,
Q1=sample(c(0,1,2),1000,replace=TRUE),
Q2=sample(c(0,1),1000,replace=TRUE))
df %>%
mutate_at("Q1",funs(set_varl(.,"Which of the following groups do you fall into?"))) %>%
.$Q1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.