title: Why I am getting this error in R after trying to install Rtools4.0?
body: <p>I tried to install Rtools 4.0 and I think I messed something on my machine that R is using.
  Now, I cannot load any library to use it. Here is the code and the error I see:</p>
  <pre><code>library(xgboost)
  </code></pre>
  <p>The Error:</p>
  <pre><code>Error: package or namespace load failed for ‘xgboost’ in inDL(x, as.logical(local), as.logical(now), ...):
   unable to load shared object 'C:/Program Files/R/R-4.1.2/library/stats/libs/x64/stats.dll':
    LoadLibrary failure:  The network path was not found.
  </code></pre>
  <p>Also:</p>
  <pre><code>library(caret)
  </code></pre>
  <p>The Error:</p>
  <pre><code>Loading required package: ggplot2
  Error: package or namespace load failed for ‘ggplot2’ in inDL(x, as.logical(local), as.logical(now), ...):
   unable to load shared object 'C:/Program Files/R/R-4.1.2/library/stats/libs/x64/stats.dll':
    LoadLibrary failure:  The network path was not found.
  
  Error: package ‘ggplot2’ could not be loaded
  </code></pre>