sql like statement not recognized in RStudio

The %like% operator is not implemented in R so you can't use it like if it was SQL, to give you an alternative solution we would need a proper REPRoducible EXample (reprex) illustrating your issue.