As an extension to several questions in this forum similar to this, and since none of the suggestions already provided in this forum I checked could provide me the solution I am looking for, I am posting this question.
I would like to split a list of variable length strings that contain a variable number of a symbol that could be considered as a delimiter into a dataframe as shown in the example below. . Any suggestions?
x = c(NA, "a/b", "a/b/c/d", "a/b/c","a/c","a/b/c/d/e")
df <- data.frame(x1 = c("a","a","a","a","a"),
x2 = c("b","b","b","c","b"),
x3 = c(NA,"c","c",NA,"c"),
x4 = c(NA,"d",NA,NA,"d"),
x5 = c(NA,NA,NA,NA,"e"))