Re: [R] manipulating text to generate different formulas to use in nls()

2009-08-11 Thread bartjoosen
Take a look at ?eval Bart Héctor Villalobos-2 wrote: > > Hello, > > In doing a series of non-linear estimations of a function which is a sum > of a varying number > of sinusoids, I would like to "autogenerate" the arguments needed by nls() > depending on that > number. > > For example, whe

[R] manipulating text to generate different formulas to use in nls()

2009-08-10 Thread Héctor Villalobos
Hello, In doing a series of non-linear estimations of a function which is a sum of a varying number of sinusoids, I would like to "autogenerate" the arguments needed by nls() depending on that number. For example, when there are two sinusoids: > nls( y ~ mu + A1 * cos(2*pi*f1*x - P1) + A2