0

I recently installed RTools (windows computer) and now it seems like all of my packages associated with tidyverse (e.g., tidyverse itself, dplyr, ggplot2, etc) no longer will load and can't be installed.

I get the following error when I load my R session:

Warning: namespace ‘ggplot2’ is not available and has been replaced
by .GlobalEnv when processing object ‘ima.bar’
Warning: namespace ‘scales’ is not available and has been replaced
by .GlobalEnv when processing object ‘a’
Warning: namespace ‘cowplot’ is not available and has been replaced
by .GlobalEnv when processing object ‘rtp.dashboard’

Should I simply uninstall RTools and see if everything gets fixed? Or do I need to re-install R? The system environment (Sys.getenv()) also seems to have changed after installing RTools to something I'm not even sure of where it is (it isn't the folder where my packages are contained -- oddly, tidyverse does not even have a folder there either)>

user3585829
  • 945
  • 11
  • 24
  • 2
    RTools (by its installation or side-effect) does not impact any package installation or library path (`.libPaths()`). On my machine at least, it does not alter `PATH` or other environment variables; I rely on R (and `devtools`) to find and use it (I have it installed as `c:/Rtools/`, for a few reasons, not all sysadmins permit this). I wonder if things like your envvars changing are a symptom of some other change that you or your network admins have imposed. (Also, are you reloading `.Rdata` files in your projects? I avoid those like the plague.) – r2evans Nov 22 '19 at 18:44
  • Thanks, I'm not trying to load .Rdata files. That has never happened until this morning (after installing RTools -- but that might be a coincidence). Is there a way to prevent that from happening? – user3585829 Nov 22 '19 at 18:53
  • 2
    Note that there is a distinct difference between *"not trying to load .Rdata files"* and it actually happening. In RStudio, go to *"Tools > Global Options... > Workspace"* and verify if "Restore .RData into workspace at start" is selected (I believe it defaults to checked). (I'm assuming you are using RStudio.) – r2evans Nov 22 '19 at 18:57
  • Yes, it is checked (and yes, I'm in RStudio). Oddly, when I even search for the ggplot2 or tidyverse package in RStudio, they don't come up? – user3585829 Nov 22 '19 at 19:01
  • 1
    Packages missing when you think they should be installed are almost always due to an issue with `.libPaths()`, I suggest you search for that trigger instead of RTools. On my win10 laptop, I have `"C:/Users/r2/R/win-library/3.5" "c:/R/R-3.5.3/library"`, so all packages that I install are loaded under my homedir. If you don't have that, or if it is pointing to a path you don't recognize, try adding your intended path to the set and see what happens. – r2evans Nov 22 '19 at 19:20

0 Answers0