The is.atomic()
function in R is used to check if an R object is atomic or not.
When an R object is atomic it can be used to create atomic vectors.
Note: R has six basic atomic vector types: logical, integer, real, complex, string (or character), and raw.
is.atomic(x)
# creating R objectsmyname <- "Theophilus"addition <- 5 + 3numbers <- c(0:10)a <- (quote(exp))b <- expression(x+1)# implementing the is.atomic() functionis.atomic(myname)is.atomic(addition)is.atomic(numbers)is.atomic(a)is.atomic(b)
is.atomic()
function on the R objects to check if they are atomic or not.