title: How to install 'XLConnect'-package in R correctly
body: <p>I am very new to this community.
  My aim is to use R for statistical analysis but some errors occurred.</p>
  
  <p>In the first step, I want to load the "XLConnect"-package, in order to open an xlsx-data file, with this code:</p>
  
  <p><code>install.packages('XLConnect')
  library(XLConnect)</code></p>
  
  <p>Answer was "package ‘XLConnect’ successfully unpacked and MD5 sums checked", after which the following error was given:</p>
  
  <blockquote>
    <p>Error in library(XLConnect) : the package ‘XLConnect’ doesn't exist.</p>
  </blockquote>
  
  <p>I also tried the xlsx package, but in this case always got:</p>
  
  <blockquote>
    <p>Error in -library('openxlsx') : invalid argument to unary operator </p>
  </blockquote>
  
  <p>or, that the package openxlsx, doesn't exist but some line before it told me the download, installation and check sums were correct!</p>
  
  <p>Additionally, when I try to change the directory in a script, using
  <code>getwd()</code>, the following error occurs:</p>
  
  <blockquote>
    <p>Error in -getwd() : invalid argument to unary operator</p>
  </blockquote>
  
  <p>When I type it in the console it works.</p>
  
  <p>I downloaded R here: <a href="https://cran.r-project.org/bin/windows/base" rel="nofollow noreferrer">https://cran.r-project.org/bin/windows/base</a>,  installed R version 3.4.3 as well as R Studio.
  I already looked in the community for some hints but neither could solve my problem:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/36192312/xlconnect-function-is-not-passing-argument-to-system-file">XLConnect function is not passing argument to system.file</a></li>
  <li><a href="https://stackoverflow.com/questions/24576507/error-when-installing-xlconnect-in-rstudio">Error when installing XLConnect in RStudio</a></li>
  </ul>
  
  <p>MY OS is Windows 10, I tried the 32-bit as well as the 64-bit version of R and installed fitting Java-Versions for both verisons( that was the first error that occured but now isn't there anymore). </p>
  
  <p>I tried to load the packages from several CRAN-Mirrors but always the same error occurs (e.g. Germany(Göttingen),Germany(Münster), Belgium(Ghent) or Switzerland ).
  Maybe I missed some very basic setting. Is the information I provided enough or do you need more?</p>
  
  <p>Thanks a lot in advance for your support!</p>