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@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.

Reply via email to