enum() creates a vector of integers from 1 to length of the object (it
enumerates items in the object), except if the object is empty. It is
particularly useful in the
for(i in enum(object)) construct.
for(i in 1:length(object)) is often found, but it fails
length(object) == 0!
enum() is indeed a synonym of
but the later one is less expressive in the context.
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.