问题
When I run install.packages("xlsx")
I get this:
Installing package into ‘C:/Users/Zahra/Documents/R/win-library/3.1’ (as ‘lib’ is unspecified) Warning: unable to access index for repository https://rweb.quant.ku.edu/cran/bin/windows/contrib/3.1 Warning: unable to access index for repository http://www.rforge.net/bin/windows/contrib/3.1 Warning message: package ‘xlsx’ is not available (as a binary package for R version 3.1.3)
I already tried setRepositories
and a couple of more things but no luck! I appreciate any comments
回答1:
I found my own answer! I figured the problem was that for installing all those packages, the required package was "rjava" that couldn't be loaded. The reason was the fact I am using a 64-bit OS and R version but do not have Java installed with the same architecture.I downloaded Java 64-bit(Windows Offline (64-bit)) from this page: https://www.java.com/en/download/manual.jsp After that just reloaded the xlsx package and it worked
来源:https://stackoverflow.com/questions/31389317/unable-to-install-xlsx-package-on-r-version-3-1-3