From p.dalgaard at biostat.ku.dk  Sun Oct 14 19:01:55 2007
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Sun, 14 Oct 2007 19:01:55 +0200
Subject: [Rd] bug (?) in [.data.frame with matrix-like indexing
In-Reply-To: <47123766.2060308@statistik.uni-dortmund.de>
References: <47123766.2060308@statistik.uni-dortmund.de>
Message-ID: <47124B83.5040004@biostat.ku.dk>

Uwe Ligges wrote:
> Consider in R-2.6.0 (also R-patched from yesterday):
>
> iris[1, c(TRUE, FALSE, FALSE, FALSE, FALSE)]
> ##  Error in .subset2(xx, j) : recursive indexing failed at level 2
>
> iris[1, c(FALSE, FALSE, FALSE, FALSE, TRUE)]
> ## Error in .subset2(xx, j) : attempt to select less than one element
>
> i.e. matrix-like indexing on data.frames, one logically-indexed 
> dimension with only one value TRUE in it.
>
> It is not documented to work, but it did so in former versions of R.
> Is it a bug or withdrawn support?
>
>
>   
It's been reported before. Looks unintentional.

As I also said last time, the log for the relevant revision has

"make DF[, 1] and DF[1:m, 1] consistent"

(and it doesn't...)


> Uwe Ligges
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>   


-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



[Rd] bug (?) in [.data.frame with matrix-like indexing
Peter Dalgaard