The R documentation says
is.atomic
returnsTRUE
ifx
is of an atomic type (orNULL
) andFALSE
otherwise.
is.recursive
returnsTRUE
ifx
has a recursive (list
-like) structure andFALSE
otherwise.
is.atomic
is true for the atomic types ("logical"
,"integer"
,"numeric"
,"complex"
,"character"
and"raw"
) andNULL
.Most types of objects are regarded as recursive, except for the atomic types,
NULL
and symbols (as given byas.name
).
According to the above, I thought a vector is a recursive object, but the two functions show the opposite.
Also a function (like c
) is also a recursive object
So what are the definitions of recursive objects and of atomic objects in R?