R/row_vars.R

Defines functions row_vars

Documented in row_vars

#' @name row_vars
#' @title Row Variances
#' @param x matrix
#' @return vector with the variance of each of row of the input matrix
#' @export
#' @examples
#' row_vars(t(matrix(1:5)))
row_vars <- function(x)
  row_means((x - row_means(x)) ^ 2)

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.