Thursday, September 5, 2019

R tip of the day

R tip of the day: partial string matching

The data.table package has the operator %like%, which is super handy for partial string matching:

"system with blue screen" %in% "blue"
> FALSE

"system with blue screen" %like% "blue"
> TRUE
.