Re: [R] find max. value for a equation by optimize

2015-10-29 Thread Jianling Fan
Oops! Thanks a lot! Jean On 29 October 2015 at 15:45, Adams, Jean wrote: > If you read the help file for optimize, you will see that you need to set > the argument maximum to TRUE. > > ?optimize > > optimize(sm, c(0, 50), maximum=TRUE) > > Jean > > On Thu, Oct 29, 2015 at 4:19 PM, Jianling Fan

Re: [R] find max. value for a equation by optimize

2015-10-29 Thread Adams, Jean
If you read the help file for optimize, you will see that you need to set the argument maximum to TRUE. ?optimize optimize(sm, c(0, 50), maximum=TRUE) Jean On Thu, Oct 29, 2015 at 4:19 PM, Jianling Fan wrote: > Hello, everyone, > > I have a specific equation, When I draw it out, I found there