Although I saw similar questions and solutions, but I still couldn't solve my problem. I want to split my elements in my data.table into single values and insert into new rows.
The data is like this:
dt <- data.table("0100"=c("9103,9048,9903,7837","8738,2942,2857,4053"),
"0101"=c("9103,9048,9903","2537,1983"))
I want it to be like this:
dt2 <- data.table("0010" = c(9103,9048,9903,7837,8738,2942,2857,4053),
"0101" = c(9103,9048,9903,2537,1983,NA,NA,NA))
Since I just start learning R, Please help me solve this problem