Hello R, I have data in txt file of n columns like this: x y1 .....yn 1 100 2 50 3 10 4 200 5 20
I need to find coordinates for each maxima e.g.: [x,y1],[x,y2]...[x,yn] a=read.table() attach(a) b=y1<-x max(b) returns only value of y but no corresponding x value -- View this message in context: http://r.789695.n4.nabble.com/Finding-coordinates-for-maximum-of-a-function-tp3355369p3355369.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.