[R] rbinom for a matrix

From: ACroske <Audy3272_at_yahoo.com>
Date: Wed, 09 Jul 2008 10:30:25 -0700 (PDT)

I have a large matrix full of probabilities; I would like to convert each probability to a 1 or a 0 using rbinom.
How can I do this on the entire matrix? The matrix was converted from a raster ArcMap dataset, so the matrix is essentially a map. Because of this, I have no column headings.


View this message in context: http://www.nabble.com/rbinom-for-a-matrix-tp18366867p18366867.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 09 Jul 2008 - 18:25:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jul 2008 - 20:33:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive