R/misc.R

#' Get the last element of a vector
#' 
#' \code{last} extracts the last element of a vector
#'
#' @param x A vector
#'
#' @examples 
#' x <- 1:4
#' last(x)
#' 
#' x <- c("hello", "my", "name", "is", "buttons")
#' last(x)
#' 
#' @export

last <- function (x) {
  x[length(x)]
}

Try the obfuscatoR package in your browser

Any scripts or data that you put into this service are public.

obfuscatoR documentation built on Sept. 8, 2023, 5:48 p.m.