R/p_fit.R

Defines functions get_fit

get_fit <- function(ceiling, fdh_ceiling) {
  if (is.nan(ceiling) || is.nan(fdh_ceiling)) {
    return ( NA )
  }
  if (ceiling > fdh_ceiling) {
    return ( NA )
  }
  return(100 - 100 * abs(ceiling - fdh_ceiling) / fdh_ceiling)
}

Try the NCA package in your browser

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

NCA documentation built on May 29, 2024, 8:47 a.m.