#' Return Last
#'
#' Return last value in vector
#' @param x Atomic vector
#' @export
#' @return Last value
#' @examples
#' last(x = 1:10)
last <- function(x){
if (is.atomic(x)){
return(x[length(x)])
}else{
stop("'x' must be an atomic vector.")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.