powered by
The function returns a vector of the positions of (first) matches of its first argument in its second.
BASIX.match(elements,vec)
values to be matched
the values to be matched against
BASIX.match stops at the first match and continues with the next element of elements starting from the match position in vec.
BASIX.match
elements
vec
The native R solution would be:
match(elements,vec)
# NOT RUN { elements <- c(1,2,10) vec <- c(2,3,4,10,11) BASIX.match(elements,vec) # }
Run the code above in your browser using DataLab