[R] Finding coordinates for maximum of a function

Bert Gunter gunter.berton at gene.com
Tue Mar 15 15:10:20 CET 2011


Right.

?which.max

is what's needed.

-- Bert

On Tue, Mar 15, 2011 at 6:00 AM, nblarson <nblarson at gmail.com> wrote:
> That actually won't work.  max(y) will give a value, not a coordinate, so
> x[max(y)] is definitely not what you want.
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Finding-coordinates-for-maximum-of-a-function-tp3355369p3356483.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>



-- 
Bert Gunter
Genentech Nonclinical Biostatistics



More information about the R-help mailing list