How to install and Load xlsx package in RStudio usind Windows10
1
0
Entering edit mode
7.2 years ago
Sanches • 0

Hi there,

I have tried to install and load xlsx package but I could not do that. Could anyone help me?

I got the following error:

library(xlsx)
Carregando pacotes exigidos: rJava
Error: package or namespace load failed for ‘rJava’:
 .onLoad falhou em loadNamespace() para 'rJava', detalhes:
  chamada: fun(libname, pkgname)
  erro: JAVA_HOME cannot be determined from the Registry
Error: package ‘rJava’ could not be loaded

Thanks in advance

R • 18k views
ADD COMMENT
1
Entering edit mode

I know it doesn't help with this enquiry, but I've found the readxl package is more portable between platforms

ADD REPLY
0
Entering edit mode

Is Java installed on this machine?

ADD REPLY
0
Entering edit mode

And if it is, check if it is the 32 or 64 bit, and then check if R is also 32 or 64.

ADD REPLY
0
Entering edit mode

Yes, it is......................................................................................

ADD REPLY
0
Entering edit mode

So you have not actually installed xlsx? install.packages("xlsx")

ADD REPLY
0
Entering edit mode
5.5 years ago
Shicheng Guo ★ 9.5k

It is caused you didn't tell where Java is to R. Try the following command to tell the system where Java is:

Sys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jre1.8.0_201')
library("rJava")
library("Deducer")
ADD COMMENT

Login before adding your answer.

Traffic: 1891 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6