Skip to content
Prev 6956 / 63468 Next

Feature Request: "matrix[1:10,1:10, block=F] <- 1:10"

Hi Guys,

I've again been surprised when something like
gives block-wise application of the assignment:

     [,1] [,2] [,3]
[1,] "b"  "b"  "b" 
[2,] "a"  "a"  "a" 
[3,] "c"  "c"  "c" 

when what I wanted was by-element assignment:

     [,1] [,2] [,3]
[1,]   ""   ""  "b"
[2,]  "a"   ""   ""
[3,]   ""  "c"   ""


I always end up writing the code:
to do what I want.

So, I'm thinking about creating a patch to the R source to add an optional
parameter, say "block",  to the "[<-" call for matrixes and data frames.  

When "block=T" (the default) the old behaviour is preserved.  When "block=F"
the behavior I want occures so that
would do what I want.


Comments?  Cheers?  Jeers?  Silence?


-Greg

 



LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._