is.colnames {str2str} | R Documentation |
Test for 'colnames'
Description
is.colnames
returns whether elements of a character vector are colnames of an object.
Usage
is.colnames(nm, x)
Arguments
nm |
character vector. |
x |
object whose colnames are desired to be tested. |
Details
If the object does not have any colnames, then the function will return 'FALSE' for each element of the character vector.
Value
TRUE for every element of 'nm' that is a colname of x and FALSE otherwise. The structure is a logical vector with length = length('nm') and names = 'nm'. See details for special cases.
Examples
data("mtcars")
is.colnames(x = as.matrix(mtcars), nm = c("MPG","mpg"))
[Package str2str version 1.0.0 Index]