From hpages at fhcrc.org  Fri Jun  4 22:58:15 2010
From: hpages at fhcrc.org (=?ISO-8859-1?Q?Herv=E9_Pag=E8s?=)
Date: Fri, 04 Jun 2010 13:58:15 -0700
Subject: [Rd] named empty list
In-Reply-To: <19464.51914.206199.975249@lynne.math.ethz.ch>
References: <4C080FA6.9070400@fhcrc.org>
	<19464.51914.206199.975249@lynne.math.ethz.ch>
Message-ID: <4C0968E7.4060402@fhcrc.org>

Thanks Martin.  H.

Martin Maechler wrote:
>>>>>> "HP" == Herv? Pag?s <hpages at fhcrc.org>
>>>>>>     on Thu, 03 Jun 2010 13:25:10 -0700 writes:
> 
>     HP> Hi,
>     HP> I just realized that a named empty list is displayed the same
>     HP> way as an empty list:
> 
>     >> list(aa=2:5)[0]
>     HP> list()
>     >> list()
>     HP> list()
> 
>     HP> For empty atomic vectors, the print method makes the difference:
> 
>     >> c(aa=3L)[0]
>     HP> named integer(0)
>     >> integer(0)
>     HP> integer(0)
> 
>     HP> Maybe lists could do that too?
> 
> Yes, I agree.  I have had at least one situation in the past
> where I had even been confused for a few minutes by this.
> I'm about to add it for R-devel [2.12.0] (only; considering it a
> new feature).
> 
> Martin Maechler, ETH Zurich

-- 
Herv? Pag?s

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



[Rd] named empty list
=?ISO-8859-1?Q?Herv=E9_Pag=E8s?=