R/min.fix.na.R

Defines functions min.fix.na

Documented in min.fix.na

#' min function, removing Inf and -Inf
#'
#' @keywords internal
min.fix.na <- function(minputdata) {
  minputdata[minputdata == Inf] <- NA
  minputdata[minputdata == -Inf] <- NA
  if (sum(!is.na(minputdata)) == 0) {
    return(NA)
  } else {
    return(min(minputdata, na.rm = T))
  }
}
lozalojo/mem documentation built on April 1, 2021, 1:37 a.m.