You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code, I have this warning at every line where I use a function that is not part of base R, e.g. tools::md5sum() (even though tools is loaded automatically via a namespace), reshape2::melt(), ggplot2::ggplot() and so on.
Once I run the library(package) command, this warning disappears with a slight delay. But it does not disappear if this is part of a project using the package renv. So I'm not sure whether it's an issue with RStudio in general or renv in particular.
I use RStudio 1.3.959.
Here my sessionInfo() of the project using renv:
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] tools stats graphics grDevices datasets utils methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.2 rstudioapi_0.11 yaml_2.2.1 tinytex_0.24 crayon_1.3.4
[6] xfun_0.15 renv_0.11.0
Activity
kevinushey commentedon Jul 10, 2020
Thanks for the bug report. I've reproduced this locally as well.
To reproduce, first ensure that all R diagnostics are enabled:
Then, create a new RStudio project using
renv(e.g. via the New Project dialog), then create an R document with the contents:Save that document. Upon save, you should see the false positive emitted:
(Note: I was also able to reproduce without using
renvat all...)ivan-paleo commentedon Jul 13, 2020
In my session, when I run
library(tools), the warning disappears, except if it is in a project usingrenv.