
Last chance! 50% off unlimited learning
Sale ends in
This function returns a logical value that indicates if a data frame or another named object contains an element with a specific name.
has_name(x, name)
A data frame or another named object
Element name(s) to check
A logical vector of the same length as name
Unnamed objects are treated as if all names are empty strings. NA
input gives FALSE
as output.
# NOT RUN {
has_name(iris, "Species")
has_name(mtcars, "gears")
# }
Run the code above in your browser using DataLab