csgillespie / benchmarkme

Crowd sourced benchmarking
https://csgillespie.github.io/benchmarkme/
40 stars 13 forks source link

Missing import: Error in globalVariables(c("a", "b", "ans")) : could not find function "globalVariables" #28

Closed HenrikBengtsson closed 4 years ago

HenrikBengtsson commented 4 years ago

Hi. The

https://github.com/csgillespie/benchmarkme/blob/8ee0d3a1c25887407647db352082f1d2d87b36a3/R/benchmark_matrix_calculations.R#L1

lacks a @importFrom utils globalVariables or needs to be specified as:

utils::globalVariables(...)

I'm getting errors on this when revdep checking several packages, e.g. R CMD check on data.frame reports:

Error in globalVariables(c("a", "b", "ans")) : 
  could not find function "globalVariables"
Error: unable to load R code in package ‘benchmarkme’
Execution halted

PS. I've spotted many other packages that forget to import globalVariables(), setMethod(), ...

csgillespie commented 4 years ago

Thanks