title: r - How to specify the path in normalizePath, or get around this error associated with it?
body: <p>I'm learning R and just have it installed on my office computer. I don't have the administrator right on the computer (as I even have to call IT for installation).</p>
  
  <p>Then I install a package. At first it doesn't work when typing, for example:</p>
  
  <pre><code>install.packages("thepackage")
  </code></pre>
  
  <p>The error message is this:</p>
  
  <pre><code>Error in normalizePath(path.expand(path), winslash, mustWork) : 
    path[1]="\\company\5050\Users\myusername\Documents\R\win-library\3.3": Access is denied
  In addition: Warning message:
  In normalizePath(path.expand(path), winslash, mustWork) :
    path[1]="\\company/5050/Users/myusername/Documents/R/win-library/3.3": Access is denied
  </code></pre>
  
  <p>I do some homework and find that a potential solution is to "Map a network drive to your network folder". I'm not sure what it means, but I try this:</p>
  
  <pre><code>install.packages("thepackage",lib="H:/Documents/R/win-library/3.3")
  </code></pre>
  
  <p>because it looks like I have more "control" of H drive (it has my username on it). And it works:</p>
  
  <pre><code>package ‘thepackage’ successfully unpacked and MD5 sums checked
  The downloaded binary packages are in
      C:\Users\myusername\AppData\Local\Temp\Rtmp4MNURu\downloaded_packages
  </code></pre>
  
  <p>I then fail to load the package,</p>
  
  <pre><code>library(thepackage)
  </code></pre>
  
  <p>saying:</p>
  
  <pre><code>Error in normalizePath(path.expand(path), winslash, mustWork) : 
    path[1]="\\company/5050/Users/myusername/Documents/R/win-library/3.3": Access is denied
  </code></pre>
  
  <p>But again this works:</p>
  
  <pre><code>library(thepackage,lib="H:/Documents/R/win-library/3.3")
  </code></pre>
  
  <p>So how can I set the normalizePath to the one that works to avoid additional and rather unnecessary specification of library directory?</p>