getmatcolfromlist: getmatcolfromlist extracts named columns from a list of...

View source: R/rutils.R

getmatcolfromlistR Documentation

getmatcolfromlist extracts named columns from a list of matrices or df

Description

getmatcolfromlist One often has a list of matrices

Usage

getmatcolfromlist(x, columname)

Arguments

x

a list of 2d matrices

columname

the name of the row or column to be extracted

Value

a list of the required columns

Examples

y <- matrix(rnorm(100,mean=5,sd=1),nrow=10,ncol=10,
            dimnames=list(paste0(1:10,"R"),paste0(1:10,"C")))
x <- list(one=y,two=y)
getmatcolfromlist(x,columname="5R")
getmatcolfromlist(x,columname="4C")            

haddonm/codeutils documentation built on April 15, 2024, 1:02 p.m.