Re: [R] strsplit for multiple columns

2009-06-03 Thread Henrique Dallazuanna
Try this: do.call(cbind, lapply(a[2:ncol(a)], function(x)do.call(rbind, strsplit(as.character(x), '' On Wed, Jun 3, 2009 at 10:39 AM, Duijvesteijn, Naomi < naomi.duijveste...@ipg.nl> wrote: > > Hi, > > > I am trying to split multiple columns. One column works just fine, but I > want to

[R] strsplit for multiple columns

2009-06-03 Thread Duijvesteijn, Naomi
Hi, I am trying to split multiple columns. One column works just fine, but I want to do it for multiple columns… Example > a ID V2 V3 V4 V5 V6 V7 V8 V9 V10 1 PBBA0644 -- GG AA -- AA -- AA GG GG 2 PBBA1010 -- GG AA -- AA -- AA GG GG 3 0127ATPR -- GG AA -- AA