bd2kccd/r-causal

Error when installing on Win10

Closed this issue · 4 comments

This is the version info

platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          3                           
minor          5.0                         
year           2018                        
month          04                          
day            23                          
svn rev        74626                       
language       R                           
version.string R version 3.5.0 (2018-04-23)
nickname       Joy in Playing   

The packages stringr and rJava were installed normally but an error (see below) occurred when installing r-causal.

> install_github("bd2kccd/r-causal")
Downloading GitHub repo bd2kccd/r-causal@master
√  checking for file 'C:\Users\Shoubo\AppData\Local\Temp\RtmpSCTm95\remotes3d7866da46f3\bd2kccd-r-causal-8d2b178/DESCRIPTION' ...
-  preparing 'rcausal': (7.2s)
√  checking DESCRIPTION meta-information ...
-  checking whether 'INDEX' is up-to-date ... NO
-  use '--force' to remove the existing 'INDEX'
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  building 'rcausal_1.1.1.tar.gz'
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'rcausal/java/edu/cmu/tetrad/algcomparison/algorithm/mixed/pattern/MixedFgesDiscretingContinuousVariables.java'
   Warning in utils::tar(filepath, pkgname, compression = "gzip", compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'rcausal/java/edu/cmu/tetrad/algcomparison/algorithm/mixed/pattern/MixedFgesTreatingDiscreteAsContinuous.java'
   
Installing package into ‘C:/Users/Shoubo/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package 'rcausal' ...
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'rcausal'
    finding HTML links ... done
    audiology                               html  
    bayesEst                                html  
    ccd                                     html  
    charity                                 html  
    randomDag                               html  
    rcausal                                 html  
    tetradrunner                            html  
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
Error: package or namespace load failed for 'rcausal':
 .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: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/Shoubo/Documents/R/win-library/3.5/rcausal'
In R CMD INSTALL
Error: Failed to install 'rcausal' from GitHub:
  (converted from warning) installation of package ‘C:/Users/Shoubo/AppData/Local/Temp/RtmpSCTm95/file3d786e1d6783/rcausal_1.1.1.tar.gz’ had non-zero exit status

I was wondering where I went wrong that caused this issue? Thanks!

It should be some wrong with your Java setting and installation. Did you install JDK or JRE? It needs JDK 8 either from Oracle or openJDK. However, have you try running r-causal on Docker? https://hub.docker.com/r/chirayukong/r-causal-rstudio/

The JRE should be correctly installed since pycausal could work normally.

I have no idea what Docker is but will give it a try. Much appreciated!

For others ran into the same issue, I solve it following this link.

Basically, both 32 and 64bit JDK should be installed if you are using 64bit R.

Thanks for the link. I'll put it on the README.