R/max.fix.na.R

Defines functions max.fix.na

Documented in max.fix.na

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