ourMELONS/R/rand.R
Waldir Leoncio fca9caa731 Restyled files
Ran through styler::style_dir() in the R and tests directories in preparation for #23.
2021-11-10 14:25:50 +01:00

10 lines
391 B
R

#' @title Generate matrix with U(0, 1) trials
#' @description Imitates the behavior of `rand()` on Matlab
#' @param r number of rows of output matrix
#' @param c number of columns of output matrix
#' @return \eqn{r \times c} matrix with random trials from a standard uniform distribution.
#' @importFrom stats runif
#' @export
rand <- function(r = 1, c = 1) {
matrix(runif(r * c), r, c)
}