customRowMeans: Calculate statistics for each row or column of a matrix

View source: R/utils.R

customRowMeansR Documentation

Calculate statistics for each row or column of a matrix

Description

Calculate statistics for each row or column of a matrix

Usage

customRowMeans(mat, na.rm = FALSE, fast = FALSE)

customRowMedians(mat, na.rm = FALSE, fast = FALSE)

customRowVars(mat, na.rm = FALSE, fast = FALSE)

customRowMins(mat, na.rm = FALSE, fast = FALSE)

customRowMaxs(mat, na.rm = FALSE, fast = FALSE)

customRowRanges(mat, na.rm = FALSE, fast = FALSE)

customColMedians(mat, na.rm = FALSE, fast = FALSE)

Arguments

mat

Matrix

na.rm

Boolean: remove missing values (NA)?

fast

Boolean: use Rfast functions? They may return different results from R built-in functions

Value

Vector of selected statistic

Examples

df <- rbind("Gene 1"=c(3, 5, 7), "Gene 2"=c(8, 2, 4), "Gene 3"=c(9:11))
psichomics:::customRowMeans(df)
psichomics:::customRowVars(df, fast=TRUE)

nuno-agostinho/psichomics documentation built on Feb. 11, 2024, 11:16 p.m.