I am facing the following issues in RStudio running on Windows 7. I repaired Java and the jvm.dll file is also there:
library(xlsx) # necessary to write data
Error : .onLoad failed in loadNamespace() for 'xlsx', details:
call: .jinit()
error: Cannot create Java virtual machine (-6)
In addition: Warning message:
package ‘xlsx’ was built under R version 3.1.3
Error: package or namespace load failed for ‘xlsx’
Can anyone help me? I cant run the xlsx library and its crucial to my code.
For reading and writing data frames without any special formatting, readxl and writexl are great alternatives to xlsx. When I need to write summary output to Excel for colleagues, I find openxlsx to be much more intuitive and straightforward than xlsx for creating nicely formatted summary tables (e.g., borders, bold text, wrapped text, merged cells, conditional formatting, custom placement, etc.) in Excel workbooks.
Hello
I am unable to use xlsx
Neither are openxlsx, readxlsx and writexlsx functions available to use
Tried re-installing but it shows me this msg
library("rJava", lib.loc="~/R/win-library/3.5") Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry
You need to install Java requirement properly on your system. The issue is with rJava that can't work because it does not have (or find) what's needed on your system.
Advice to help avoid this painful situation : look at alternative mentioned in previous post. They don't have a Java dependency and are good ways to deal with excel files.
It's well known problem, it's been for many times on stackoverflow. First, i advice you to use openxlsx - it always worked good for me.
Second, start clean environment and the first thing to run will be .jinit and other java machine settlements like heap size, you run it even before libraries