fm.rnorm | R Documentation |
fm.rnorm
creates a FlashR vector with random numbers from
normal distribution.
fm.rnorm.matrix
creates a FlashR matrix with random numbers from
normal distribution.
fm.rnorm(n, mean = 0, sd = 1, in.mem = TRUE, name = "") fm.rnorm.matrix(nrow, ncol, mean = 0, sd = 1, in.mem = TRUE, name = "")
n |
the number of random numbers to be generated. |
mean |
the mean of the distribution. |
sd |
the standard deviation of the distribution. |
in.mem |
whether the vector is stored in memory. |
name |
the name of the matrix. It's stored on disks, it's used as the file name. |
nrow |
the number of rows in the generated matrix. |
ncol |
the number of columns in the generated matrix. |
If a user provides name
and in.mem
is TRUE
, the created
vector/matrix will be kept on disks persistently. That is, even if a user
exits from R, the vector/matrix will still be kept on disks.
Da Zheng <dzheng5@jhu.edu>
vec <- fm.rnorm(10) # a vector of 10 elements filled with random numbers under normal distribution. mat <- fm.rnorm.matrix(10, 2) # a 10x2 matrix.