Rdocumentation
powered by
Learn R Programming
data.table (version 1.8.8)
last: Last item of an object
Description
Returns last item of a vector, list or data.table.
Usage
last(x,...)
Arguments
x
A vector, list or data.table. Otherwise S3 method is dispatched, for compatibility with
xts::last
.
...
If any arguments other than
x
are supplied, such as
n
or
keep
regardless of
x
's type, then S3 dispatch is deployed.
Value
The last item of a vector or list. If
x
is a
data.table
, the last row as a one row
data.table
. Otherwise, whatever
xts::last
returns.
See Also
NROW