R/utils.R

# internal wrapper for mean function to handle all NA obs
mean_fn <- function(x, ...) {
  
  out <- NA
  if (!all(is.na(x)))
    out <- mean(x, ...)
  
  out
  
}
jdyen/occupancy documentation built on July 8, 2019, 3:33 a.m.