Hervé Pagès
2009-Nov-12 05:20 UTC
[Rd] unname() returns a named vector when the input vector has length 0
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
Martin Maechler
2009-Nov-12 10:26 UTC
[Rd] unname() returns a named vector when the input vector has length 0
>>>>> "HP" == Herv? Pag?s <hpages at fhcrc.org> >>>>> on Wed, 11 Nov 2009 21:20:57 -0800 writes:HP> Hi, >> x <- c(aa=22, bb=555) >> unname(x[FALSE]) HP> named numeric(0) Thank you, Herv?, I'm about to commit a simple fix for that. Martin