whereAre: Matches a scalar with elements of a vector.

View source: R/whereAre.r

whereAreR Documentation

Matches a scalar with elements of a vector.

Description

The function closely resembles the match function, but allows for multiple matches.

Usage

whereAre(a,b,verbose=TRUE)

Arguments

a

a scalar

b

a numeric or character vector

verbose

logical: print messages on console?

Value

A numeric vector

Author(s)

Sebastian Weirich

Examples

a <- 12
b <- c(10, 11, 12, 10, 11, 12)
match(a, b)
whereAre(a=a, b=b)

eatTools documentation built on Nov. 23, 2023, 5:06 p.m.