# check if specified names are present in the given object
object_has_names(mtcars, "am")
object_has_names(anscombe, c("x1", "z1", "y1"))
object_has_names(list("x" = 1, "y" = 2), c("x", "a"))
# check if a dataframe has rownames
object_has_rownames(mtcars)
Run the code above in your browser using DataLab