From Martin Maechler <maechler@stat.math.ethz.ch>  Wed Aug 20 18:06:11 1997
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Wed, 20 Aug 1997 19:06:11 +0200
Subject: R-alpha: R-0.50-a3: [logical, drop = FALSE] -- bug in R (and S-plus)
Message-ID: <199708201706.TAA02765@sophie.ethz.ch>

This is a bug both in R and S-plus (in R it's "worse"), I think.
Look at this :

ma <- cbind(1,1:8); logi <- rep(c(T,F),4)
ma[logi,]
##>      [,1] [,2]
##> [1,]    1    1
##> [2,]    1    3
##> [3,]    1    5
##> [4,]    1    7

##-- now the same with  [ , drop = FALSE]

## R (-0.50-a3) :

	 ma[logi, drop = F]
##>> Error: invalid subscript type


## Splus-3.4:
	 ma[logi, drop = F]
##>> [1] 1 1 1 1 1 3 5 7

##---- which is not correct either, we would want the matrix !
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: R-0.50-a3: [logical, drop = FALSE] -- bug in R (and S-plus)
Martin Maechler