R/ones.R

Defines functions ones

Documented in ones

#' Make a one-column matrix of 1s
#'
#' @export
#' @param sample_size The number of rows for the matrix.
#' @return A one column matrix of 1s with \code{sample_size} rows.
#'
ones <- function(sample_size) {
  matrix(1, nrow = sample_size, ncol = 1)
}
jgabry/RHhelpers documentation built on Feb. 22, 2024, 12:56 p.m.