split column into multile columns code example Example: r separate column into multiple columns df %>% separate(mainColumn,c('c1','c2'),'_',extra ='merge')