Match: Match

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Match.R

Description

Return the positions of its first argument that matches in its second.

Usage

1
Match(x,key=NULL)

Arguments

x

A numeric vector.

key

The value/vector for searching in vector x. For now let it NULL. dont't use it!.

Details

This function implements the R's \"match\" function. This version basicaly calculates the match(x,sort(unique(x))) for now. Do not use the argument key!

Value

Returns the position/positions of the given key/keys in the x vector.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <[email protected]>

See Also

match

Examples

1
2
3
4
y <- rnorm(100)
a <- Match(y)
b <-50
all.equal(as.vector(a),as.vector(b))

Rfast documentation built on May 14, 2018, 9:04 a.m.