#how to make this faclist
faclist <- list(
col1 = "Sales",
col2 = "OPS",
col3 = "Management",
col4 = "HR"
)
#from
var <- c("col1","col2","col3","col4")
labels <- c("Sales","OPS","Management","HR")
#do
faclist2 <- setNames(purrr::map(labels,identity),
var)
#check
all.equal(faclist,faclist2)