last: Last element of a vector

View source: R/last.R

lastR Documentation

Last element of a vector

Description

Returns the last element of a vector or the n-th element counting from the end of a vector.

Usage

last(x, n = 1)

Arguments

x

vector

n

optional integer specifying the n-th element from the end to be returned

Value

scalar of the same type as x

Author(s)

Danail Obreschkow


obreschkow/cooltools documentation built on Nov. 16, 2024, 2:46 a.m.