Skip to content
Prev 5938 / 398506 Next

subset of matrix vs data frame

In Splus this works,
but in R only if a is matrix,
Error in [<-.data.frame(*tmp*, a == 1, value = 2) : 
        matrix subscripts not allowed in replacement

Was this a design decision?  Sorry if I missed it in
An Introduction to R.

Denis
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._