From pburns at pburns.seanet.com  Tue Feb 26 11:30:09 2013
From: pburns at pburns.seanet.com (Patrick Burns)
Date: Tue, 26 Feb 2013 10:30:09 +0000
Subject: [Rd] double bracket stripping names
Message-ID: <512C8EB1.8060401@pburns.seanet.com>

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')



[Rd] double bracket stripping names
Patrick Burns