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

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Calculate statistics for each row or column of a matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

1
2
3
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)

psichomics documentation built on Nov. 8, 2020, 5:44 p.m.