What are is.atomic(), is.vector() and is.numeric() functions responsible for?

DWQA QuestionsCategory: R LanguageWhat are is.atomic(), is.vector() and is.numeric() functions responsible for?
Editor Staff asked 10 months ago

What are is.atomic(), is.vector() and is.numeric() functions responsible for?

1 Answers
Editor Staff answered 10 months ago

These three functions are responsible for –
The role of is.atomic is to test if the vector is atomic in nature.
Is.numeric checks if the object has an integer or a double type and does not belong to “factor”,
“Data”, “POSIXt” or “difftime” class.
is.vector() is responsible for testing if the object is vector and therefore, has no attributes
excluding names.
Recommended Reading – R Functions Tutorial