like

0th

Percentile

Convenience function for calling regexpr.

Intended for use in [.data.table i.

Keywords
data
Usage
like(vector,pattern)
vector
Arguments
vector
Either a character vector or a factor. A factor is faster.
pattern
Passed on to regexpr.
Value

  • Integer vector containing the locations of vector which match the pattern using regexpr.

Note

Current implementation does not make use of sorted keys.

See Also

data.table, regexpr

Aliases
  • like
  • %like%
Examples
DT = data.table(Name=c("Mary","George","Martha"), Salary=c(2,3,4))
    DT[Name %like% "^Mar"]
Documentation reproduced from package data.table, version 1.6.5, License: GPL

Community examples

Looks like there are no examples yet.