I have a rectangular data file, where one variable is a column of quoted character vectors. This variable will need to be further broken into a list of substrings, split by some delimiter. It is in the data file this way because for each observation (each subject/each row), they may have any amount of these substrings. In PHP, there is a function called explode that splits a string into an array of substrings, based on some delimiter. In R, strsplit accomplishes the same thing.
explode <- function(delimiter, string){ strsplit(string, delimiter)[[1]] }
string <- "a,b,c,d,e,f,g" explode(string, ",") [1] "a" "b" "c" "d" "e" "f" "g"