Re: [R] nls and if statements

2012-05-17 Thread DWatts
Peter Ehlers wrote > > >> > > If the above data is all you have, I wouldn't chugg too long. > Looking at plots of Cfl~Pw and Cfl~Tsoil says to me that you > have far too much variability to fit your model. > > You might find this plot instructive: > >library(rgl) >plot3d(Pw, Tsoil, Cf

Re: [R] nls and if statements

2012-05-17 Thread DWatts
David Winsemius wrote > >>> and provide commented, minimal, self-contained, reproducible code. >> > Still untested in absence of data. > Thank you, and my apologies for not giving some sample numbers. Below is a short subset of the data set I'm working with. Cfl=c(2.61,4.21,2,2.75,7.47,1.2,3.2

[R] nls and if statements

2012-05-17 Thread DWatts
Hi All, I have a situation where I want an 'if' variable to be parameterized. It's entirely possible that the way I'm trying to do this is wrong, especially given the error message I get that indicates I can't do this using an 'if' statement. Essentially, I have data where I think a relationship