last | R Documentation |
Returns the last element of a list or vector.
last(x)
x |
a list or vector. |
Designed to be faster than using tail()
or rev()
, and cleaner
than writing x[length(x)]
.
An object of the same type as x
of length 1 (or empty if
x
is empty).
Robin Evans
tail
, rev
.
last(1:10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.