title: How to change and remove default library location?
body: <p>I am running R on a networked computer where I don't have write access to most locations on the C drive. However, my IT department decided to load the entire CRAN repository in the default library location on the C drive. I would strongly prefer to manage my packages on my own, and have a location on my networked drive I can install to, but I am trying to get R to ignore and forget the C drive location entirely.</p>
  
  <p>I have tried creating an .Rprofile file to set the library location, but no matter what I do, <code>.libPaths()</code> does not seem to forget the default location. I have tried the following:</p>
  
  <pre><code>.Library &lt;- file.path("N:/My Documents/R/win-library/3.2")
  .Library.site &lt;- file.path("N:/My Documents/R/win-library/3.2")
  .lib.loc &lt;- file.path("N:/My Documents/R/win-library/3.2")
  .libPaths(.libPaths())
  </code></pre>
  
  <p>Where the path on the N drive is the new location I want to be the <em>only</em> library path. But when I restart R and run <code>.libPaths()</code>, I still see this:</p>
  
  <pre><code>[1] "\\\\fileu/users$/username/My Documents/R/win-library/3.2"
  [2] "C:/Program Files/R/R-3.2.4/library"
  </code></pre>
  
  <p>(On a side note, I'm trying to switch from the symbolic '\fileu' reference to a reference to the N drive.)</p>
  
  <p>I know there have been similar questions asked on this in the past (e.g., <a href="https://stackoverflow.com/questions/2698269/how-do-you-change-library-location-in-r">here</a>), but the particular problem I'm having is that it's not <em>forgetting</em> the C drive location. I can't seem to erase that at all. Any help would be greatly appreciated!</p>