R/row_means.R

Defines functions row_means

Documented in row_means

#' @name row_means
#' @title Row Means
#' @param x matrix
#' @return vector with the mean of each of row of the input matrix
#' @export
#' @examples
#' row_means(t(matrix(1:5)))

row_means <- function(x)
  apply(x, 1, mean)

Try the transformer package in your browser

Any scripts or data that you put into this service are public.

transformer documentation built on Nov. 10, 2023, 5:08 p.m.