2

I am building an R package, and I am constantly getting this warning about "scales" (below). I scanned my entire code, but I can't figure out where the problem is. Any suggestions would be helpful. Thanks!

> checking dependencies in R code ... WARNING
  '::' or ':::' import not declared from: ‘scales’

There are the packages that I am importing in my package.

Imports: 
    tibble,
    ggplot2,
    uwot,
    dplyr,
    tidyr,
    broom,
    tidyselect, 
    ggridges,
    Boruta,
    parallel
Suggests: 
    knitr,
    rmarkdown,
    testthat,
    covr
Rohit Farmer
  • 319
  • 4
  • 15
  • 5
    You're likely using a function from the scales package using `scales::rescale()` or something of the sort that you haven't declared in your imports. The problem should disappear if you circumvent that function, or add the scales package to your imports. – teunbrand Feb 02 '22 at 21:20
  • @teunbrand I couldn't figure out where I am calling a function from the scales package but when I import it in my description the warning seems to go away. – Rohit Farmer Feb 02 '22 at 21:28
  • Mostly ggplot2 is requiring the scales package – Dave2e Feb 02 '22 at 23:32
  • Agreeing with @teunbrand here - seems likely you are using a `scales` function without really knowing it's a `scales` function. Not sure what you mean by "when I import it in my description the warning seems to go away", but if it's in your local environment, then probably you already have `scales` loaded, so no issues. Typing `scales::` in R studio brings up the context menu - it's not too many functions to scan through and see if you recognize your code uses those. – chemdork123 Feb 03 '22 at 16:34

0 Answers0