[Rd] double bracket stripping names
Patrick Burns
pburns at pburns.seanet.com
Tue Feb 26 11:30:09 CET 2013
Is it on purpose that `[[` strips the
names when used on an atomic vector?
> c(a=1, b=2)[1]
a
1
> c(a=1, b=2)[[1]]
[1] 1
> sessionInfo()
R Under development (unstable) (2013-02-11 r61902)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
--
Patrick Burns
pburns at pburns.seanet.com
twitter: @burnsstat @portfolioprobe
http://www.portfolioprobe.com/blog
http://www.burns-stat.com
(home of:
'Impatient R'
'The R Inferno'
'Tao Te Programming')
More information about the R-devel
mailing list