Improved documentation

This commit is contained in:
Waldir Leoncio 2020-01-14 16:37:00 +01:00
parent 06eb8e5433
commit 47eb3f4e90
6 changed files with 15 additions and 14 deletions

View file

@ -4,6 +4,7 @@
#' @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)
}

View file

@ -3,7 +3,7 @@
#' @details This function was created to replicate the behavior of a homonymous
#' function on Matlab
#' @param mx matrix
#' @param n either a scalat with the number of replications in both rows and columns or a 2-length vector with individual repetitions.
#' @param n either a scalar with the number of replications in both rows and columns or a 2-length vector with individual repetitions.
#' @return matrix replicated over `ncol(mx) * n` columns and `nrow(mx) * n` rows
#' @note The Matlab implementation of this function accepts `n` with length > 2.
#' @export