Dear R experts,
I'd like to fit data with weighted function fcn(data, p1, p2). At
first I used the standard form:
nls(~ fcn(data, p1, p2),
start = list(p1 = p01, p2 = p02),
data = data)
Then, I decided to change fcn() that it would be able to accept expression
as an additional parameter,
nls(~ fcn(data, expr, p1, p2), ...)
# ('expr' is defined just before 'nls' calling)
Error in eval(expr, envir, enclos) : Object "expr" not found
Yes, in help(nls) is pointed, that
Arguments:
data: an optional data frame in which to evaluate the variables in
`formula'
But, I'd like 'nls' to see my expression 'expr'... :-/ How
can I do that?
Thank you!
--
WBR,
Timur.