Re: [R] how to bind lists recursively

2008-05-28 Thread John Fox
ehalf Of Prof Brian Ripley > Sent: May-28-08 9:12 AM > To: John Fox > Cc: r-help@r-project.org; [EMAIL PROTECTED] > Subject: Re: [R] how to bind lists recursively > > On Wed, 28 May 2008, John Fox wrote: > > > Dear Brian and Bill, > > > > Here's an inter

Re: [R] how to bind lists recursively

2008-05-28 Thread Prof Brian Ripley
- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, 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.o

Re: [R] how to bind lists recursively

2008-05-28 Thread John Fox
> 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 > > a <- vector(&quo

Re: [R] how to bind lists recursively

2008-05-28 Thread Patrick Burns
: [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 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

Re: [R] how to bind lists recursively

2008-05-27 Thread Prof Brian Ripley
L 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 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, ...

Re: [R] how to bind lists recursively

2008-05-27 Thread Gabor Grothendieck
> -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 recursively > > > On 28/05/2008, at 2:4

Re: [R] how to bind lists recursively

2008-05-27 Thread Bill.Venables
TECTED] [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 recursively On 28/05/2008, at 2:43 PM, Daniel Yang wrote: > Dear all, > > I want to create a list that conta

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 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 ho

[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 la