last {data.table}R Documentation

Last item of an object

Description

Returns last item of a vector, or last row of a matrix, data.frame or data.table.

Usage

last(x)

Arguments

x A vector, matrix, data.frame or data.table

Value

The last item. If x is a data.table, the last row is returned at a one row data.table.

Author(s)

Matt Dowle

See Also

NROW


[Package data.table version 1.2 Index]