fm.runif | R Documentation |
fm.runif
creates a FlashR vector with uniformly random numbers.
fm.runif.matrix
creates a FlashR matrix with uniformly random
numbers.
fm.runif(n, min = 0, max = 1, in.mem = TRUE, name = "") fm.runif.matrix(nrow, ncol, min = 0, max = 1, in.mem = TRUE, name = "")
n |
the number of random numbers to be generated. |
min |
lower limits of the distribution. |
max |
upper limits of the distribution. |
in.mem |
whether the vector is stored in memory. |
name |
the name of the vector. 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.runif(10) # a vector of 10 elements filled with uniform random numbers. mat <- fm.runif.matrix(10, 2) a 10x2 matrix filled with uniform random numbers.