R/convfkt2nlform.R

Defines functions convfkt2nlform

Documented in convfkt2nlform

convfkt2nlform<-function(fktlistex,namesdata=NULL){
  fktmodels <- fktlistex
  a0 <- call("~", fktmodels$fkt)
  a1 <- formula(a0)
  a2 <- names(fktmodels$par)
  b <- deriv3(a1, a2)
  a5 <- call("~", (~yr)[[2]], b)
  fktmodels[[9]] <- a5
  names(fktmodels)[9] <- "fkm"
  .org1 <- call("~",(~yr)[[2]],a0[[2]])
  fktmodels[[10]] <- .org1
  names(fktmodels)[10] <- "origin"		
  result <- nl.form(form=fktmodels$fkm,p=length(fktmodels$par),
        inv=fktmodels$inv,par=fktmodels$par,name=fktmodels$name,
        independent="xr",dependent="yr",origin=fktmodels$origin)
  return(result)
}

Try the nlr package in your browser

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

nlr documentation built on July 31, 2019, 5:09 p.m.