Skip to content
Prev 78200 / 398503 Next

need suggestion about building formual

Thanks for your kind respond. Although the answer didn't solve my question 
clearly,maybe I still not understand the art of R.

I'm sorry that I had not talked the problem clearly, maybe a example with more 
detail will be suitable as suggested in the the posting guide.
 
In function fitting program, such as Sigmaplot, a fitting formula, can be  
write in separate form:
G=a+(b*x)^(1/2)
k=exp((G-G0)/(R*T))
fit k to y

of course,in R's nls, can write as:
mynls<-nls(formula=y~exp((a+(b*x)^(1/2)-G0)/(R*T)),data=mydata,...)

In this example, the formula is simple and acceptable. However, when the 
formula is more complexity,writing all in one formula,the readability will be 
damaged.So I'm looking for a way to write simple and readable code in this 
situation.
Spencer Graves wrote: