Re: [R] Finding coordinates for maximum of a function

From: nblarson <>
Date: Mon, 14 Mar 2011 16:54:57 -0700 (PDT)

This is where which.max() comes in handy n<-length(x)
for(i in 1:n){

x.c is then a vector of x coordinates for the maximum for columns y1,y2,...,yn

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 15 Mar 2011 - 07:38:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Mar 2011 - 07:50:21 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive