rand,randn | R Documentation |
Generate matrices of pseudorandom values.
rand(m,n)
randn(m,n)
m |
Number of matrix rows. |
n |
Number of matrix columns. |
Function rand
returns a matrix containing pseudorandom values
drawn from the standard uniform distribution (using runif
).
Function randn
returns a matrix containing pseudorandom values
drawn from the standard normal distribution (using rnorm
).
An m x n numeric matrix.
Peter Carbonetto peter.carbonetto@gmail.com
P. Carbonetto and M. Stephens (2012). Scalable variational inference for Bayesian variable selection in regression, and its accuracy in genetic association studies. Bayesian Analysis 7, 73–108.
x <- rand(10,5)
y <- randn(10,5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.