I need some help writing a code in R to mutate a dataframe. Below you will find what my dataframe looks like. The last column which is 'genres' contains an array and needs to be split into multiple columns within the dataframe.
id value name movies_95_04 main_genre
1 0 8 Tordy, G\xe9za 10 Comedy
2 1 40 Reviczky, G\xe1bor 17 Comedy
3 10 42 Cserna, Antal 19 Drama
4 100 229 Marcella, Jade 178 Adult
5 1000 9 Delarive, Mathieu 13 Drama
6 10000 12 De Grandpr\xe9, Fr\xe9d\xe9rick 11 Drama
genres
1 Adventure:1,Animation:1,Comedy:2,Family:1,NULL:3,Romance:1,War:1
2 Comedy:7,Crime:2,Fantasy:1,Musical:1,NULL:2,Romance:2,Short:1,War:1
3 Adventure:1,Animation:1,Comedy:2,Drama:5,Fantasy:1,NULL:5,Romance:3,Thriller:1
4 Adult:135,Crime:1,NULL:41,Short:1
5 Comedy:1,Drama:2,Horror:1,NULL:7,Short:2
6 Comedy:1,Drama:5,NULL:3,Romance:1,Thriller:1
This is what I've done so far but instead its giving me a new dataframe which contains empty cells in it.
Merged_actors2_ <- str_split_fixed(Merged_actors$genres, ",", 19)