last extracts the last element of a vector

last(x)

Arguments

x

A vector

Examples

x <- 1:4 last(x)
#> [1] 4
x <- c("hello", "my", "name", "is", "buttons") last(x)
#> [1] "buttons"