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

Description Usage Arguments Value Examples

View source: R/cpuefuncs.r

Description

incol is a utility to determine whether a names columns is present in a given matrix or data.frame.

Usage

1
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

1
2
3
4
5
6
7
8
9
## Not run: 
test <- matrix(c(1,2,3,4),nrow=2,ncol=2,dimnames=list(1:2,c("year","Catch")))
print(test)
iscol("year",test)
iscol("Catch",test)
iscol("catch",test)
iscol("ages",test)

## End(Not run)

haddonm/r4cpue documentation built on May 11, 2020, 1:31 a.m.