R/last.R

Defines functions last

Documented in last

#' get the last element
#'
#' @param x anything you can call \code{tail} on (vector, data frame, etc.)
#'
#' @return the last element of \code{x}
#'
#' @details this function is made of several thousand lines of complex code,
#'    so be sure to read it carefully.
#'
#' @author Alyssa Frazee
#'
#' @export
#' @examples
#' last(c('h', 'e', 'l', 'l', 'o'))

last = function(x) return(tail(x, n=1))
alyssafrazee/ballgown documentation built on Sept. 3, 2021, 7:15 p.m.