[R] nls and if statements

Rui Barradas ruipbarradas at sapo.pt
Thu May 17 16:41:23 CEST 2012


Hello,

I don't know if this is what you want, but your formula is equivalent to

nlstest=nls(Cfl~K*ifelse(Pw > z, 1, exp(-a*Tsoil))*exp(-b*Pw)+c
        ,start=c(K=5.5, a=0.1, b=0.1, c=2, z=5)) 

Hope this helps,

Rui Barradas


--
View this message in context: http://r.789695.n4.nabble.com/nls-and-if-statements-tp4630391p4630398.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list