I have a question very similar to what discussed here: Split data frame string column into multiple columns However, given the following dataframe:
before = data.frame(attr = c(1,30,4,6), type=c('foo_and_bar','foo_and_bar_2'))
attr Name
1 1 George
2 30 Mark
3 4 Susan
I would need to split the "Name" column into multiples of 2 characters. The expected result should be:
attr Split1 Split2 Split3
1 1 Ge or ge
2 30 Ma rk
3 4 S us an
I have honestly now idea of how use the dplyr separate feature to achieve that. Thanks for the help.