From g.russell at eos-solutions.com  Tue Feb  9 10:50:09 2010
From: g.russell at eos-solutions.com (g.russell at eos-solutions.com)
Date: Tue,  9 Feb 2010 10:50:09 +0100 (CET)
Subject: [Rd] Confusing error message for [[.factor (PR#14209)
Message-ID: <20100209095009.A817C282EFC8@mail.pubhealth.ku.dk>

Full_Name: George Russell
Version: 2.10.0 and 2.11.0 Under development (unstable) (2010-02-08 r51108)
OS: Windows
Submission from: (NULL) (217.111.3.131)


> c("a","b")[[c(TRUE,FALSE)]]
Error in `[[.default`(factor(c("a", "b")), c(TRUE, FALSE)) : 
  recursive indexing failed at level 1

I find this error message confusing, though after reading the HELP carefully I
think I know what is going on. Would not something like "[[ does not work with
logical index vectors" be more appropriate?

sessionInfo is (for 2.11) :
R version 2.11.0 Under development (unstable) (2010-02-08 r51108) 
i386-pc-mingw32 

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

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



[Rd] Confusing error message for [[.factor (PR#14209)
g.russell at eos-solutions.com