last
last.Rd
Function to extract last element
Arguments
- x
Vector or dataframe to extract last element from
- type
Character specifying whether to use last row or column if dataframe. One of "row" or "col". Default "col".
Examples
last(data.frame(x = c(1, 2, 3), y = c("A", "B", "C")))
#> y
#> 1 A
#> 2 B
#> 3 C