Skip to content

Instantly share code, notes, and snippets.

@luisDVA
Created March 26, 2018 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisDVA/6af65c46905dcd7ce6724bdc6d7b0235 to your computer and use it in GitHub Desktop.
Save luisDVA/6af65c46905dcd7ce6724bdc6d7b0235 to your computer and use it in GitHub Desktop.
library(dplyr)
library(tidyr)
library(stringr)
library(purrr)
survey <- data_frame(ID= factor(seq.int(1,6,1)), answers=c("a","b,c","d,e","c,d","b,c,e","e"))
#survey %>%
map(survey$answers,strsplit,",")
survey
s2 <- survey %>% transform(answers=strsplit(answers,","))
survey %>% unnest(answers=strsplit(answers,","))
devtools::install_github("ropenscilabs/codefinch")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment