bgreenwell / investr

Inverse estimation in R
22 stars 6 forks source link

predict2.nls fails if a parameter in the function is called "d" #3

Closed johnaponte closed 10 years ago

johnaponte commented 10 years ago

for (i in 1:length(param.names)) { assign(param.names[i], coef(object)[i]) } assign(xname, d[, xname])

If a coefficient is named "d", the "d" data.frame is replaced and the code fails.

bgreenwell commented 10 years ago

Good catch, I'll try and fix that some time this week.

bgreenwell commented 10 years ago

Fixed. Switched d to .data in the code for predict2.nls.