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)]
}
edsandorf/obfuscatoR documentation built on Sept. 15, 2023, 12:29 a.m.