R/aer.R

Defines functions aer

Documented in aer

aer <-
function(obs, predict)
{
   obs <- as.vector(obs)
   predict <- as.vector(predict)
   if (length(obs) != length(predict))
      stop("incompatible dimensions!")
   n <- length(obs)
   dif <- function(x, y) mean(x != y)
   rate <- dif(obs, predict)
   return(rate)
}

Try the biotools package in your browser

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

biotools documentation built on Aug. 7, 2021, 9:06 a.m.