[Rd] named empty list

From: Hervé Pagès <hpages_at_fhcrc.org>
Date: Thu, 03 Jun 2010 13:25:10 -0700


I just realized that a named empty list is displayed the same way as an empty list:

> list(aa=2:5)[0]

> list()


For empty atomic vectors, the print method makes the difference:

> c(aa=3L)[0]

   named integer(0)
> integer(0)


Maybe lists could do that too?


 > sessionInfo()
R version 2.12.0 Under development (unstable) (2010-04-20 r51787) x86_64-unknown-linux-gnu


  [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8
  [5] LC_MONETARY=C              LC_MESSAGES=en_CA.UTF-8
  [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

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

R-devel_at_r-project.org mailing list
Received on Thu 03 Jun 2010 - 20:31:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 04 Jun 2010 - 10:00:57 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive