Simple wrapper functions that allow Lisp-like list processing in
R: first
to fifth
return the first to fifth element
of the list x
. rest
returns all but the first
element of the list x
. is.empty
returns TRUE
iff the list x
is of length 0. is.atom
returns
TRUE
iff the list x
is of length 1.
is.composite
returns TRUE
iff the list x
is
of length > 1. contains
return TRUE
iff the list
x
contains an element identical to elt
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
x |
A list or vector. |
elt |
An element of a list or vector. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.