Re: [R] assigning NULL to a list element without changing the length of the list

2012-11-15 Thread arun
012 4:01 PM Subject: [R] assigning NULL to a list element without changing the length of the list Hi, I have a list: tmp0 <- list(a=1, b=2, c=3) And I realize that I can append a NULL element to the end of this list, just by writing: length(tmp0) <- 4 Now, the question is, how can I as

Re: [R] assigning NULL to a list element without changing the length of the list

2012-11-15 Thread William Dunlap
-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Gonçalo Ferraz > Sent: Thursday, November 15, 2012 1:01 PM > To: r-help@r-project.org > Subject: [R] assigning NULL to a list element without changing the length of > the list > > Hi, > > I have

[R] assigning NULL to a list element without changing the length of the list

2012-11-15 Thread Gonçalo Ferraz
Hi, I have a list: tmp0 <- list(a=1, b=2, c=3) And I realize that I can append a NULL element to the end of this list, just by writing: length(tmp0) <- 4 Now, the question is, how can I assign NULL to one of the existing list elements without changing the length of the list? Please note I a