Convenience function for calling regexpr.
Intended for use in [.data.table i.
- Either a character vector or a factor. A factor is faster.
- Passed on to
- Integer vector containing the locations of vector which match the pattern using regexpr.
Current implementation does not make use of sorted keys.
DT = data.table(Name=c("Mary","George","Martha"), Salary=c(2,3,4)) DT[Name %like% "^Mar"]
Looks like there are no examples yet.