R/update.a.R

Defines functions update.a

update.a <- function(Eols, r) {
  fit <-stats::lm(r ~ Eols)
  if (length(unique(Eols[, 1])) == 1) {
    a0 <- stats::coef(fit)[-2]
  }  else {
    a0 <- stats::coef(fit)[-1]
  }
  return (list(a0 = a0))
}

Try the GEInfo package in your browser

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

GEInfo documentation built on Jan. 11, 2022, 1:07 a.m.