Skip to content

Instantly share code, notes, and snippets.

@sankars
Created April 10, 2014 05:59
Show Gist options
  • Select an option

  • Save sankars/10346419 to your computer and use it in GitHub Desktop.

Select an option

Save sankars/10346419 to your computer and use it in GitHub Desktop.
vector <- c(45, 5, 64, 80)
tail(vector, 1)
vector[length(vector)]
last <- function(x) { tail(x, n = 1) }
last(vector)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment