I have a question about plots. For example we have variable a and b, we plot this in R and you get the point. Now, I want to make a range of best/highest point. Is there a way to generate a ranking in the point? I thought maybe something with mean?
Thanks!
a<- c(1,3,7,5,3,8,4,5,3,6,9,4,2,6,3)
b<- c(5,3,7,2,7,2,5,2,7,3,6,2,1,1,9)
plot(a,b)
Based on your comment to get the positions of the points with the 5 highest
bvalues, useorder:And you can use this to get the relevant
aandbvalues:You can use this also to highlight them in the plot:
Note that there is some overplotting here (2 values at (3,7))