R/which.min2.R

Defines functions which.min2

Documented in which.min2

#' Find the min of a list starting from the end
#'
#' @param x list of elements
#' @param last.index starting from the last index (=TRUE). Default is false
#' @param ... hypotetical additional elements
#'
#' @return
#' @export
#'
#' @examples
which.min2 <- function(x, last.index = FALSE, ...){
  if(last.index) max(which(x == min(x, ...))) else which.min(x)
}

Try the RationalExp package in your browser

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

RationalExp documentation built on May 2, 2019, 2:07 a.m.