Re: [R] how to bind lists recursively

2008-05-28 Thread Patrick Burns
1:02 PM To: Daniel Yang Cc: r-help@r-project.org Subject: Re: [R] how to bind lists recursively On 28/05/2008, at 2:43 PM, Daniel Yang wrote: Dear all, I want to create a list that contains 0,1,2,3, ..., 1 as its elements. I used the following code, which apparently doesn't work

Re: [R] how to bind lists recursively

2008-05-28 Thread John Fox
AM To: [EMAIL PROTECTED] Cc: r-help@r-project.org Subject: Re: [R] how to bind lists recursively But pre-allocation still helps a - vector(list, 10001) for(i in 0:1) a[[i+1]] - i gives user system elapsed 0.042 0.001 0.057 on my system, against user system

Re: [R] how to bind lists recursively

2008-05-28 Thread Prof Brian Ripley
, Canada web: socserv.mcmaster.ca/jfox -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley Sent: May-28-08 2:04 AM To: [EMAIL PROTECTED] Cc: r-help@r-project.org Subject: Re: [R] how to bind lists recursively But pre-allocation still helps

[R] how to bind lists recursively

2008-05-27 Thread Daniel Yang
Dear all, I want to create a list that contains 0,1,2,3, ..., 1 as its elements. I used the following code, which apparently doesn't work very well. a - 0 for(i in 1:1) { a - list(a, i) } The result is not what I wanted. So how to create the bind lists recursively so that the

Re: [R] how to bind lists recursively

2008-05-27 Thread Charilaos Skiadas
On May 27, 2008, at 10:43 PM, Daniel Yang wrote: Dear all, I want to create a list that contains 0,1,2,3, ..., 1 as its elements. I used the following code, which apparently doesn't work very well. a - 0 for(i in 1:1) { a - list(a, i) } The result is not what I wanted. So how

Re: [R] how to bind lists recursively

2008-05-27 Thread Rolf Turner
On 28/05/2008, at 2:43 PM, Daniel Yang wrote: Dear all, I want to create a list that contains 0,1,2,3, ..., 1 as its elements. I used the following code, which apparently doesn't work very well. a - 0 for(i in 1:1) { a - list(a, i) } The result is not what I wanted. So how

Re: [R] how to bind lists recursively

2008-05-27 Thread Bill.Venables
Sent: Wednesday, 28 May 2008 1:02 PM To: Daniel Yang Cc: r-help@r-project.org Subject: Re: [R] how to bind lists recursively On 28/05/2008, at 2:43 PM, Daniel Yang wrote: Dear all, I want to create a list that contains 0,1,2,3, ..., 1 as its elements. I used the following code, which

Re: [R] how to bind lists recursively

2008-05-27 Thread Gabor Grothendieck
, (which everyone suspects is going to be needed here...). Bill Venables. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rolf Turner Sent: Wednesday, 28 May 2008 1:02 PM To: Daniel Yang Cc: r-help@r-project.org Subject: Re: [R] how to bind lists