Learn R Programming

wrTopDownFrag (version 1.0.4)

.chColNa: Check Column Names from Matrix Or data.frame

Description

Check matrix or data.frame for containing columns with specified name and optionally remove other columns (by their names)

Usage

.chColNa(x, colNa = "index", rmCol = NULL, callFrom = NULL)

Value

This function returns a matrix or data.frame with adjusted columns

Arguments

x

(matrix or data.frame)

colNa

(character)

rmCol

(character)

callFrom

(character) allow easier tracking of message(s) produced

See Also

scoreFragments

Examples

Run this code
ma1 <- matrix(1:6, nrow=2, dimnames=list(NULL, c("index","aa","bb")))
.chColNa(ma1)
.chColNa(ma1, colNa="zz", rmCol="aa") 

Run the code above in your browser using DataLab