title: How to install rgl in OS X 10.14
body: <p>I am running a vanilla copy of R 3.5.2:</p>
  
  <pre><code>&gt; version
                 _                           
  platform       x86_64-apple-darwin18.2.0   
  arch           x86_64                      
  os             darwin18.2.0                
  system         x86_64, darwin18.2.0        
  status                                     
  major          3                           
  minor          5.2                         
  year           2018                        
  month          12                          
  day            20                          
  svn rev        75870                       
  language       R                           
  version.string R version 3.5.2 (2018-12-20)
  nickname       Eggshell Igloo       
  </code></pre>
  
  <p>R is installed via Homebrew:</p>
  
  <pre><code>$ brew --version
  Homebrew 1.9.2
  Homebrew/homebrew-core (git revision de1ec; last commit 2019-01-15)
  Homebrew/homebrew-cask (git revision 68a73e; last commit 2019-01-14)
  </code></pre>
  
  <p>I am trying to install the <code>rgl</code> package from within XQuartz 2.7.11 and the <code>xterm</code> application, and I get the following error:</p>
  
  <pre><code>Error in dyn.load(file, DLLpath = DLLpath, ...) : 
    unable to load shared object '/usr/local/lib/R/3.5/site-library/rgl/libs/rgl.so':
    dlopen(/usr/local/lib/R/3.5/site-library/rgl/libs/rgl.so, 6): Library not loaded: @rpath/libc++.1.dylib
    Referenced from: /usr/local/lib/R/3.5/site-library/rgl/libs/rgl.so
    Reason: image not found
  Error: package or namespace load failed for 'rgl':
   .onLoad failed in loadNamespace() for 'rgl', details:
    call: NULL
    error:        Loading rgl's DLL failed. 
          On MacOS, rgl depends on XQuartz, which you can download from xquartz.org.
  </code></pre>
  
  <p>Here is a screenshot to confirm that I am attempting the install from within the XQuartz <code>xterm</code> application:</p>
  
  <p><a href="https://i.stack.imgur.com/NaJsi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NaJsi.png" alt="xterm screenshot"></a></p>
  
  <p>Are there any additional steps required to configure Mac OS X 10.14 and XQuartz 2.7.11, which allows installation of <code>rgl</code>?</p>