title: In R (and when installing ROracle package), how do I set OCI_LIB64?
body: <p>In R (and when installing ROracle package), how do I set OCI_LIB64? I've downloaded Oracle Instant Client and have pointed the wd and the OCI_LIB64 to that. I have Windows 10 Enterprise. It's RStudio version 1.1.463 and R version 3.4.3.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>setwd('C:\\Users\\sriley03\\Documents\\')   # set to path of download (remember to escape slashes ie:  c:\\users\\etc..)
  set OCI_LIB64=C:\Users\sriley03\Documents\instantclient_19_3
  install.packages('ROracle_1.3-1.tar.gz', repos = NULL)
  </code></pre>
  
  <p>but I get the following output and errors:</p>
  
  <pre><code>&gt; setwd('C:\\Users\\sriley03\\Documents\\')   # set to path of download (remember to escape slashes ie:  c:\\users\\etc..)
  The working directory was changed to C:/Users/sriley03/Documents/ inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.Error: unexpected symbol in "set OCI_LIB64"
  
  &gt; setwd('C:\\Users\\sriley03\\Documents\\instantclient_19_3')   # set to path of download (remember to escape slashes ie:  c:\\users\\etc..)
  The working directory was changed to C:/Users/sriley03/Documents/instantclient_19_3 inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.&gt; set OCI_LIB64=C:\Users\sriley03\Documents\instantclient_19_3
  Error: unexpected symbol in "set OCI_LIB64"
  
  &gt; install.packages('ROracle_1.3-1.tar.gz', repos = NULL)
  Warning: invalid package 'ROracle_1.3-1.tar.gz'
  Error: ERROR: no packages specified
  In R CMD INSTALL
  Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.4.3\library" "ROracle_1.3-1.tar.gz"' had status 1
  Warning in install.packages :
    installation of package ‘ROracle_1.3-1.tar.gz’ had non-zero exit status
  </code></pre>
  
  <p>What can I do so that I can set OCI_LIB64 properly so that I can install ROracle? </p>
  
  <p>Thanks!</p>
  
  <p>UPDATE (8_28_19):</p>
  
  <p>I've set the OCI_LIB64 and the OCI_INC to the correct paths</p>
  
  <pre><code>Sys.setenv(OCI_LIB64="C:\\Users\\sriley03\\Documents\\oreclient_install_dir\\instantclient_19_3")
  Sys.setenv(OCI_INC="C:\\Users\\sriley03\\Documents\\oreclient_install_dir\\instantclient_19_3")
  </code></pre>
  
  <p>But now I get the following response (even though all the required headers are in that file):</p>
  
  <pre><code>* installing *source* package 'ROracle' ...
  ** package 'ROracle' successfully unpacked and MD5 sums checked
  Oracle Client Shared Library 64-bit - 19.3.0.0.0 Operating in Instant Client mode.
  found Oracle Client C:\Users\sriley03\Documents\oreclient_install_dir\instantclient_19_3
  found Oracle Client include C:\Users\sriley03\Documents\oreclient_install_dir\instantclient_19_3
  ERROR: cannot find Oracle Client include headers in C:\Users\sriley03\Documents\oreclient_install_dir\instantclient_19_3.
         Please set OCI_INC to correct location.
  Warning: running command 'sh ./configure.win' had status 1
  ERROR: configuration failed for package 'ROracle'
  * removing 'C:/Program Files/R/R-3.4.3/library/ROracle'
  In R CMD INSTALL
  Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.4.3\library" C:\Users\sriley03\AppData\Local\Temp\RtmpWUfabz/downloaded_packages/ROracle_1.3-1.tar.gz' had status 1
  </code></pre>