title: Setting LD_LIBRARY_PATH from inside R
body: <p>I have installed an R package but, in order to load it via <code>library</code>, the LD_LIBRARY_PATH needs to be set to the path where one of the libraries, called <code>libhts.so.2</code> is located. The loading only works when editing the LD_LIBRARY_PATH before going into R, <strong>not after</strong>.</p>
  
  <p>I have tried several different methods in solving this:</p>
  
  <ol>
  <li>exporting a modified LD_LIBRARY_PATH from the <code>configure</code> script located in the R package. </li>
  <li>Creating a soft link to the shared library within the same <code>configure</code> script. </li>
  </ol>
  
  <p>Both have <strong>not</strong> worked and it seems to me that there is a variable that stores the results of the LD_LIBRARY_PATH once R is started. Maybe the solution is editing that variable. </p>