Learn R Programming

multiplyr (version 0.1.1)

last: Returns last value in vector

Description

Returns last value in vector

Usage

last(x, default = NA)

Arguments

x
Vector
default
Value to pad missing data with

Value

Last value in x

See Also

Other utility functions: between, cumall, cumany, cummean, distribute, first, lag, lead, n_distinct, n_groups, nth, n

Examples

Run this code
last (1:10)

Run the code above in your browser using DataLab