Re: [Rd] Converting expression to a function

2012-03-19 Thread Hadley Wickham
Hi John, Here's a somewhat streamlined version of the code: Form2resfun <- function(f, params) { stopifnot(inherits(f, "formula"), length(f) == 3) # Create function body body <- substitute( crossprod(rhs - lhs), list(lhs = f[[2]], rhs = f[[3]]) ) # Create argument list free_para

[Rd] Converting expression to a function

2012-03-18 Thread John C Nash
Previously, I've posted queries about this, and thanks to postings and messages in response have recently had some success, to the extent that there is now a package called nlmrt on the R-forge project https://r-forge.r-project.org/R/?group_id=395 for solving nonlinear least squares problems tha