Learn R Programming

str2str (version 1.0.0)

not.colnames: Identify Elements That are Not Colnames

Description

not.colnames identifies which elements from nm are not colnames of x. If all elements are colnames, then a character vector of length 0 is returned.

Usage

not.colnames(x, nm)

Value

character vector containing the elements of nm that are not colnames of x.

Arguments

x

object with a colnames attribute

nm

character vector specifying the elements to test as colnames of x.

Examples

Run this code
not.colnames(x = as.matrix(mtcars), nm = c("MPG","mpg"))

Run the code above in your browser using DataLab