Re: [R] Breakdown of Vector

2008-11-21 Thread jim holtman
another way: exam.list <- split(EXAM, floor((seq_along(EXAM) - 1) / 20)) On Fri, Nov 21, 2008 at 10:48 AM, Rajasekaramya <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a vector of Size 7420. I wanna break down in such a way that every 20 > elements of it should be as elements of an list. > > Ex >

Re: [R] Breakdown of Vector

2008-11-21 Thread Giovanni Petris
Also something along the following lines: > x <- 1:100 > y <- split(x, (seq(along = x) - 1) %/% 5) HTH, Giovanni Petris > Date: Fri, 21 Nov 2008 07:48:09 -0800 (PST) > From: Rajasekaramya <[EMAIL PROTECTED]> > Sender: [EMAIL PROTECTED] > Precedence: list > > > Hi, > > I have a vector of Size

Re: [R] Breakdown of Vector

2008-11-21 Thread Jagat.K.Sheth
help@r-project.org Subject: [R] Breakdown of Vector Hi, I have a vector of Size 7420. I wanna break down in such a way that every 20 elements of it should be as elements of an list. Ex EXAM1 ABC, SDF, LMN,ERF,EGC,EFG,WER,FRE,QWE,ERT,DGW,QWE,YUR,ERT,GHJ,FHH,7420 what i want is Breakdown.list [[1]] A

[R] Breakdown of Vector

2008-11-21 Thread Rajasekaramya
Hi, I have a vector of Size 7420. I wanna break down in such a way that every 20 elements of it should be as elements of an list. Ex EXAM1 ABC, SDF, LMN,ERF,EGC,EFG,WER,FRE,QWE,ERT,DGW,QWE,YUR,ERT,GHJ,FHH,7420 what i want is Breakdown.list [[1]] ABC,SDF,.20 [[2]] 21.40 [[3]] 41