1

Anytime I enter the following code in r:

names(df$integers) %like% "%teen"

I receive the following error

Error in names(df$integers) %like% "%teen" : 
could not find function "%like%"

What library am I missing?

zx8754
  • 52,746
  • 12
  • 114
  • 209
Englishman Bob
  • 377
  • 2
  • 13
  • 2
    It would be from `data.table`. load the package `library(data.table); ?"%like%"`. if the package is not installed `install.packages('data.table'); library(data.table)` – akrun Oct 25 '19 at 18:23
  • Specifically, one of the not-accepted answers: https://stackoverflow.com/a/33018191 – r2evans Oct 25 '19 at 18:25
  • 4
    EnglishmanBob, if you have used it before on that computer and just don't know where it is, you can always type in `??\`%like%\`` (note the backticks) or `help.search("%like%")` and R will give you a bunch of fuzzy matches. On my computer, it identifies (as previously suggested) `data.table::like` (which includes both the `like(vec,ptn)` function and the `%like%` special). – r2evans Oct 25 '19 at 18:27

0 Answers0