Skip to content
Prev 482 / 63421 Next

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

On Wed, 20 Aug 1997, Martin Maechler wrote:

            
I don't think it's a bug
This is correct.  Did you mean ma[logi,,drop=F]? If you use
ma[logi,drop=F] then this is the equivalent of ma[logi] with drop=F. But
ma[logi] treats the matrix as a vector and there aren't any dimensions to
drop. R should probably recycle the index vector the way S does. 

The loss of dimensions is unavoidable -- suppose you had
ma[c(3,7,8),drop=F].  How are you going to turn this into a matrix?


Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-