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

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

This is where which.max() comes in handy n<-length(x)
x.c<-rep(0,n)
for(i in 1:n){
x.c[i]<-which.max[y1]
}

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

--
View this message in context: http://r.789695.n4.nabble.com/Finding-coordinates-for-maximum-of-a-function-tp3355369p3355395.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.
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive