When running lintr on an R function that uses data.table
I get the following warning:
warning: no visible global function definition for '.', Did you mean '-'?
I thought an easy fix would be adding importFrom data.table .
. I also tried quoting the dot with a backtick but it really doesn't seem to be exported. What is the recommened way to get of this error?
I could add the line
`.` <- function(){}
somewhere but I didn't get that to work and it's hacky.
What if you try quoting the dot with double quotes?
importFrom data.table "."
I know this is how I've done imports for the
magrittr
pipe operatorIf that doesn't work you can always add the
.
to aglobals.R
file that defines your global variables usingutils::globalVariables()