Skip to content
Prev 12090 / 398502 Next

replace() in matrix

On Mon, Jul 02, 2001 at 06:51:40PM +0200, Tord Snall wrote:
It is explained in the "An introduction to R" manual (which is included
in the main R distribution) under
"Index vectors: selecting and modifying subsets of a data set"

An example is
[,1] [,2] [,3]
[1,]    1  103    1
[2,]   24   56    1
[3,]    1    1   27
[,1] [,2] [,3]
[1,]    0  103    0
[2,]   24   56    0
[3,]    0    0   27
guido




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Message-ID: <20010702201531.A26879@sirio.stat.unipd.it>
In-Reply-To: <3.0.6.32.20010702185140.00af8740@mail.anst.uu.se>; from tord.snall@ebc.uu.se on Mon, Jul 02, 2001 at 06:51:40PM +0200