Learn R Programming

tester (version 0.2.0)

has_names: Has or lacks names?

Description

has_names tests if an object has names
lacks_names tests if an object lacks names

Usage

has_names(x)

Arguments

x

an R object

See Also

has_rownames

Examples

Run this code
set.seed(1)
x <- y <- runif(10)
names(x) = letters[1:10]

has_names(x) # TRUE
has_names(y) # FALSE

lacks_names(x) # FALSE
lacks_names(y) # TRUE

Run the code above in your browser using DataLab