[Rd] unname() returns a named vector when the input vector has length 0

From: Hervé Pagès <hpages_at_fhcrc.org>
Date: Wed, 11 Nov 2009 21:20:57 -0800


Hi,

> x <- c(aa=22, bb=555)
> unname(x[FALSE])

named numeric(0)

Cheers,
H.

> sessionInfo()

R version 2.10.0 (2009-10-26)
x86_64-unknown-linux-gnu

locale:

  [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
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

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

loaded via a namespace (and not attached): [1] tools_2.10.0



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 12 Nov 2009 - 06:42:35 GMT

This archive was generated by hypermail 2.2.0 : Thu 12 Nov 2009 - 11:00:23 GMT