[R] nls NAs

Elizabeth Webb webb.elizabeth.e at gmail.com
Fri Oct 12 01:26:51 CEST 2012


Hi- 

I am using the following code: 

start=c(alpha=0.4,beta=0.4) 
warm.10<-nls(warming$umoles60~alpha*exp(beta*warming$T10cm),start =
start,data=warming,na.action=na.omit) 

This code works for other columns in my dataset that are  similar to $T10cm
but the code does not work for this particular column (T10cm).  I am
assuming this is because warming$T10cm contains NAs.  I have tried just
about everything I can think of to remedy this problem (na.action=na.omit;
na.rm=T; creating a new space such that warmnoNA<-warming$T10cm!="NA") but
with no success.  With the original code above,  get the following error: 

Error in numericDeriv(form[[3L]], names(ind), env) : 
  Missing value or an infinity produced when evaluating the model 
In addition: Warning message: 
In .swts * (lhs - rhs) : 
  longer object length is not a multiple of shorter object length 

Any ideas? 

Thanks, 

Elizabeth 




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



More information about the R-help mailing list