Right. ?which.max
is what's needed. -- Bert On Tue, Mar 15, 2011 at 6:00 AM, nblarson <nblar...@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@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 ______________________________________________ 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.