Hi Benilton: David's solution is short and sweet but below also works. I
searched and searched and finally found it in the R-inferno by Patrick
Burns. I never looked at the R-inferno carefully  before. After glancing at
it,  I'm printing it out and binding it tomorrow. It's the
"got ya" book for R.

tmp0 <- list(a=1, b=NULL, c=3)

c(tmp0,list(d=NULL))


On Fri, Feb 17, 2012 at 9:17 PM, David Winsemius <dwinsem...@comcast.net>wrote:

>
> On Feb 17, 2012, at 8:51 PM, Benilton Carvalho wrote:
>
>  tmp0 <- list(a=1, b=NULL, c=3)
>>
>
>
> > length(tmp0) <- 4
> > tmp0
> $a
> [1] 1
>
> $b
> NULL
>
> $c
> [1] 3
>
> [[4]]
> NULL
>
> David Winsemius, MD
> West Hartford, CT
>
>
> ______________________________**________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/**
> posting-guide.html <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to