iscol: incol is a utility to determine if a column is present in a...

View source: R/mqmf_utils.r

iscolR Documentation

incol is a utility to determine if a column is present in a matrix

Description

incol is a utility to determine whether a named column is present in a given matrix or data.frame. Is case sensitive

Usage

iscol(incol = "year", inmat)

Arguments

incol

the name of the column; defaults to "year" as an example

inmat

the matrix or data.frame within which to search for incol

Value

TRUE or FALSE

Examples

x <- 1:10
test <- matrix(x,nrow=5,ncol=2,dimnames=list(1:5,c("year","Catch")))
print(test)
iscol("year",test)
iscol("Catch",test)
iscol("catch",test)
iscol("ages",test)

MQMF documentation built on Sept. 8, 2023, 5:14 p.m.

Related to iscol in MQMF...