Displaying 1 result from an estimated 1 matches for "binomatrix".
Did you mean:
bigmatrix
2008 Mar 11
0
Generating a new matrix using rbinom and a matrix ofprobabilities.
probMatrix <- matrix(runif(5*5), 5, 5) ## sets up the probs
binoMatrix <- rbinom(length(probMatrix), 1, probMatrix) ## simulates
dim(binoMatrix) <- dim(probMatrix) ## makes it a matrix also
What doesn't work?
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Economics Guy
Sent: Wednes...