[R] search functions for use on vector of ordered data

From: Jonathan Gabris <jonathan_at_k-m-p.nl>
Date: Thu, 28 Apr 2011 11:11:33 +0200


I am looking for some search functions that deal with _ordered data_. I suppose they already exist but I cannot find any reference of them.


I have a matrix, who's first column is ordered incrementally, with each value unique and regularly spaced.
(timestamps of observations: number of miliseconds since begining).

I want to be able to find the the column index of the value X listed in the matrix's first col.

The matrix is quite large, so the use of which(), or other similar functions are not time efficient enough.



Jonathan Gabris

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 Thu 28 Apr 2011 - 09:33:58 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 Thu 28 Apr 2011 - 11:00:33 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