From Martin Maechler <maechler@stat.math.ethz.ch>  Thu Aug 21 08:40:08 1997
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Thu, 21 Aug 1997 09:40:08 +0200
Subject: R-alpha:  [logical, drop = FALSE] -- my silliness ..
In-Reply-To: <Pine.SUN.3.95.970820101359.641C-100000@chekov> (message from
 Thomas Lumley on Wed, 20 Aug 1997 10:21:25 -0700 (PDT))
Message-ID: <199708210740.JAA03263@sophie.ethz.ch>

I must have been a bit tired or screwed up otherwise:
As Thomas guessed, I've forgotten the extra ","  which is needed for drop=..

ma[logi, , drop = FALSE]	works all right.
        ^^^
	do not forget this !

 MM> Look at this :
 MM> 
 MM> ma <- cbind(1,1:8); logi <- rep(c(T,F),4)
 MM> ma[logi,]
 MM> ##>      [,1] [,2]
 MM> ##> [1,]    1    1
 MM> ##> [2,]    1    3
 MM> ##> [3,]    1    5
 MM> ##> [4,]    1    7
 MM> 
 MM> ##-- now the same with  [ , drop = FALSE]
 MM> 
 MM> ## R (-0.50-a3) :
 MM> 
 MM> 	 ma[logi, drop = F]
 MM> ##>> Error: invalid subscript type
 MM> ## Splus-3.4:
 MM> 	 ma[logi, drop = F]
 MM> ##>> [1] 1 1 1 1 1 3 5 7
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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: [logical, drop = FALSE] -- my silliness ..
Martin Maechler