Re: [R] Optim function with multivariate inputs

2011-08-28 Thread Uwe Ligges
On 25.08.2011 19:02, Noah Silverman wrote: Hi, I have function that I want to optimize. Am playing with the optim() function in R Two issues: 1) I can't seem to get it to work with a function that takes multiple inputs. Dummy Example: myFunc<- function(A,B,D,D){ A really dummy exampl

[R] Optim function with multivariate inputs

2011-08-25 Thread Noah Silverman
Hi, I have function that I want to optimize. Am playing with the optim() function in R Two issues: 1) I can't seem to get it to work with a function that takes multiple inputs. Dummy Example: myFunc <- function(A,B,D,D){ # Do stuff return E } > myFunc(1,2,3,4) [1] 12 # wor