Hi

I have a sorted array ( in ascending order) and I want to find the subscript
of a number in the array which is the the next highest number to a given
number. For example,if I have 67 as a given number and if I have a vector
x=c(23,36,45,62,79,103,109), then how do I get the subscript 5 from x (to
get 79 which is the next highest to 67) without using a for loop?

Thx

-- 
'Raghu'

        [[alternative HTML version deleted]]

______________________________________________
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