Learn R Programming

obfuscatoR (version 0.2.2)

last: Get the last element of a vector

Description

last extracts the last element of a vector

Usage

last(x)

Arguments

x

A vector

Examples

Run this code
x <- 1:4
last(x)

x <- c("hello", "my", "name", "is", "buttons")
last(x)

Run the code above in your browser using DataLab