match_shortcuts: Shortcuts for 'fmatch' and 'match' operations

%fmin%R Documentation

Shortcuts for fmatch and match operations

Description

fmatch is a faster version of the built-in match() function. It is slightly faster than the built-in version because it uses more specialized code, but in addition it retains the hash table within the table object such that it can be re-used, dramatically reducing the look-up time especially for large tables.

Usage

x %fmin% table

x %!in% table

x %!fmin% table

Arguments

x

vector or NULL: the values to be matched.

table

vector or NULL: the values to be matched against

Details

  • %notin% avoids awkward-to-type !a %in% b

  • %fmin% fastmatch version of in

  • %notfmin% Avoids awkward-to-type !a %fmin% b


hrbrmstr/hrbrmisc documentation built on May 1, 2023, 7:39 a.m.