s <- "a,b,c" # strsplit returns a list; take the first element parts <- strsplit(s, ",")[[1]] print(parts)
split a string into pieces