Try this:
x2 <- subset(x, A != "")
split(x2, cumsum(x2$B == ""))
On Fri, Sep 4, 2009 at 8:57 AM, Dimitri Liakhovitski wrote:
> Dear R-ers!
>
> I have a badly organized data base in Excel. Once I read it into R it
> looks like this (all variables become factors because of many spaces
> and other
Try this:
lapply(grep("Name", x$A), function(idx)x[idx + 1:3,])
On Fri, Sep 4, 2009 at 9:57 AM, Dimitri Liakhovitski wrote:
> Dear R-ers!
>
> I have a badly organized data base in Excel. Once I read it into R it
> looks like this (all variables become factors because of many spaces
> and other c
Dear R-ers!
I have a badly organized data base in Excel. Once I read it into R it
looks like this (all variables become factors because of many spaces
and other characters in Excel):
x<-data.frame(A=c("","Name1","text1","text2","text3","","","","Name2","text1","text2","text3","","","Name3","text1
3 matches
Mail list logo