简体   繁体   中英

Trouble with installing r2excel package in R

I am trying to install r2excel package in R via install_github but I get this error

> install_github("kassambara/r2excel")

several lines appearing in the console and I get

* installing *source* package 'r2excel' ...
** R
** preparing package for lazy loading
Warning: package 'xlsx' was built under R version 3.4.4
** help
*** installing help indices
  converting help for package 'r2excel'
    finding HTML links ... done
    getOS                                   html  
    r2excel-package                         html  
    xlsx.addHeader                          html  
    xlsx.addHyperlink                       html  
    xlsx.addLineBreak                       html  
    xlsx.addParagraph                       html  
    xlsx.addPlot                            html  
    xlsx.addTable                           html  
    xlsx.openFile                           html  
    xlsx.readFile                           html  
    xlsx.writeFile                          html  
    xlsx.writeMultipleData                  html  
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warning: package 'xlsx' was built under R version 3.4.4
Error: package or namespace load failed for 'xlsx':
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: fun(libname, pkgname)
  error: No CurrentVersion entry in Software/JavaSoft registry! Try re-    installing Java and make sure R and Java have matching architectures.
Error : package 'xlsx' could not be loaded
Error: loading failed
Execution halted
*** arch - x64
Warning: package 'xlsx' was built under R version 3.4.4
ERROR: loading failed for 'i386'
* removing 'C:/Users/myusername/Documents/R/win-library/3.4/r2excel'
In R CMD INSTALL
Installation failed: Command failed (1)        

So I get this error on 'xlsx' loading
What is weird is that I have no trouble loading 'xlsx' and 'rJava' individually with

library(xlsx)

I have a x64 java installed (build 1.8.0_161-b12) and a x64 rStudio running so I really don't know where the problem is coming from.

According to liuyanguu in https://github.com/kassambara/r2excel/issues/6 :

"This package was not built in 64 bits system so we cannot install it this way. But you can still use all the functions by clone the repo and source or just copy-paste "/R/r2excel.r". There is actually no need to install the package."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM