next up previous
Next: Sorting matrices and dataframes Up: Database type operations Previous: Merging datasets

Matching elements between vectors

The %in% function (see also match()) takes a vector of elements and matches against another vector, returning the indices of the positions in the second vector at which the match occurs.

Last modified 12/13/08.

Chris Paciorek 2012-01-21