From tlumley at u.washington.edu  Tue Feb 12 18:07:41 2008
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Tue, 12 Feb 2008 09:07:41 -0800 (PST)
Subject: [Rd] assigning NULLs to elements of a list
In-Reply-To: <47B17DD3.1080100@ebi.ac.uk>
Message-ID: <Pine.LNX.4.43.0802120907410.21155@hymn33.u.washington.edu>

On Tue, 12 Feb 2008, Oleg Sklyar wrote:

> Dear developers:
>
> I have just came across an (unexpected to me) behaviour of lists when
> assigning NULLs to list elements. I understand that a NULL is a valid R
> object, thus assigning a NULL to a list element should yield exactly the
> same result as assigning any other object. So I was surprised when
> assigning a NULL in fact removed the element from the list. Is this an
> intended behaviour?

Yes.

>      If so, does anybody know where is it documented and
> what is a good way around?
>

One place is FAQ 7.1

       -thomas


Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



[Rd] assigning NULLs to elements of a list
Thomas Lumley