I'm trying to install 'xlsx' through install.packages('xlsx') and this shows me
Warning in install.packages :`` cannot open URL 'https://cran.rstudio.com/bin/macosx/el- capitan/contrib/3.4/PACKAGES.rds': HTTP status was '404 Not Found' trying URL 'https://cran.rstudio.com/bin/macosx/el- capitan/contrib/3.4/xlsx_0.5.7.tgz' Content type 'application/x-gzip' length 401263 bytes (391 KB``) downloaded 391 KB The downloaded binary packages are in /var/folders/tt/2_by_ybs0tb3fd0_xv2v2xbw0000gn/T//Rtmpa3VNMs/downloaded_packages
After some research, I found out that I needed to install rJava and it seemed fine. When I click xlsx and rJava through 'packages', it showed me
library("xlsx", lib.loc="/Library/Frameworks/R.framework/Versions/3.4/Resources/library") Loading required package: rJava Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object >' /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.>so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/> rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: > /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.s>o Reason: image not found Error: package ‘rJava’ could not be loaded
and this is for rJava
library("rJava", >lib.loc="/Library/Frameworks/R.framework/Versions/3.4/Resources/library") Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object >'/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.>so': >dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/>rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: >/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.s>o Reason: image not found
I was wondering what happened and want to know how to fix it. I am using a MacBook Air from 2015. Some people say 3.4.0 doesn't support xlxs or rJava yet. It would be so helpful if you tell me how to go through these issues step by step.