View source: R/datalow_utils.r
iscol | R Documentation |
incol is a utility to determine whether a names columns is present in a given matrix or data.frame.
iscol(incol = "year", inmat)
incol |
the name of the column; defaults to "year" as an example |
inmat |
the matrix or data.frame within which to search for incol |
TRUE or FALSE
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.