scal_var_mat: Generate a matrix of the scaled variance values

View source: R/scal_var.R

scal_var_matR Documentation

Generate a matrix of the scaled variance values

Description

Generate a matrix of the scaled variance values

Usage

scal_var_mat(inp, batchvec = NULL)

Arguments

inp

corralm object or matrix; embedding to compute scaled variances

batchvec

vector; batch labels (can be numeric or char). Defaults to 'NULL', which is appropriate for using a corralm object. If using an embedding matrix for inp, then this argument must be given and length must correspond to number of rows in 'inp'.

Value

matrix of the scaled variance values by PC (batches in rows; PCs in columns)

Examples

dat <- matrix(rnorm(5000), ncol = 50)
bv <- rep(seq(3),c(10,30,60))
scal_var_mat(dat, bv)

laurenhsu1/corral documentation built on Feb. 19, 2023, 10:37 p.m.