I have having the following error message when trying to optimize a function using optim:
> optim(c(10,100),fn,method="BFGS") Error in optim(c(10, 100), fn, method = "BFGS") : cannot coerce type 'S4' to vector of type 'double' > Can someone tell me what this means? Jim [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.