Split one row into multiple rows
You can use 'separate_rows' from "tidyr" package:
df = separate_rows(df,1,sep = ",")
Just try:
data.frame(countries = unlist(strsplit(as.character(df$countries), " , ")))
You can use 'separate_rows' from "tidyr" package:
df = separate_rows(df,1,sep = ",")
Just try:
data.frame(countries = unlist(strsplit(as.character(df$countries), " , ")))