title: Can't load X11 in R after OS X Yosemite upgrade, not root
body: <p>I get the following error message when I try to install some packages with R.</p>
  
  <pre><code>shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
  Error in setwd(cDir) : character argument expected
  In addition: Warning message:
  In doTryCatch(return(expr), name, parentenv, handler) :
    unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
    dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libSM.6.dylib
    Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
    Reason: image not found
  Error in setwd(cDir) : character argument expected
  </code></pre>
  
  <p>This problem had been solved here :
  <a href="https://stackoverflow.com/questions/26489928/cant-load-x11-in-r-after-os-x-yosemite-upgrade">Can&#39;t load X11 in R after OS X Yosemite upgrade</a></p>
  
  <p>My problem is that I do not have root access on this mac. Is there a way to solve this issue without root access ?</p>
  
  <p>Thanks</p>