View source: R/str2str_functions.R
is.names | R Documentation |
is.names
returns whether elements of a character vector are names of an object.
is.names(nm, x)
nm |
character vector. |
x |
object whose names are desired to be tested. |
If the object does not have any names, then the function will return 'FALSE' for each element 'nm'.
TRUE for every element of 'nm' that is a name of 'x' and FALSE otherwise. The structure is a logical vector with length = length('nm') and names = 'nm'. See details for special cases.
v <- setNames(object = letters, nm = LETTERS)
is.names(x = v, nm = c("A","a"))
data("mtcars")
is.names(x = mtcars, nm = c("MPG","mpg"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.