1

I am new to R - Programming, I am trying to run "install_github("ohdsi/SqlRender")" on windows 7, 64-bit with jdk 7 (64- bit) and R version 3.1.2 and R-GUI (64-bit).

I am getting the following error:

> library("devtools")
Warning message: 
package ‘devtools’ was built under R version 3.1.3 
> install_github("ohdsi/SqlRender")
Downloading github repo ohdsi/SqlRender@master
Installing SqlRender
"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" --no-site-file --no-environ --no-save --    no-restore CMD INSTALL  \
"C:/Users/PPingali/AppData/Local/Temp/RtmpMtqVJl/devtools1318104472eb/OHDSI- SqlRender-cc551a2"  \
  --library="C:/Users/PPingali/Documents/R/win-library/3.1" --install-tests 

* installing *source* package 'SqlRender' ...
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: inDL(x, as.logical(local), as.logical(now), ...)
  error: unable to load shared object 'C:/Users/PPingali/Documents/R/win- library/3.1/rJava/libs/i386/rJava.dll':
  LoadLibrary failure:  %1 is not a valid Win32 application.

Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/PPingali/Documents/R/win-library/3.1/SqlRender'
Error: Command failed (1)

Please help me out in fixing this issue... Thanks in advance.....

....................................................................

rJava package got installed perfectly... when i run library(rJava) gives me no error.....

  • possible duplicate of [Using the rJava package on Win7 64 bit with R](http://stackoverflow.com/questions/7019912/using-the-rjava-package-on-win7-64-bit-with-r) – Eel Lee Jun 15 '15 at 09:41
  • thanks for the reply....when i run library(rJava) gives me no error..... – Phani Kumar Pingali Jun 15 '15 at 09:46
  • There were several similar questions on stackoverflow. Please search Google using syntax like "your_error site:stackoverflow.com" - it's really efficient. So in your case, search "onLoad failed in loadNamespace() for 'rJava' site:stackoverflow.com" in Google and it will produce few pages of Stackoverflow questions *only*! Hope you'll find your answer there. – Eel Lee Jun 15 '15 at 09:50
  • I tried all the available solutions... but no luck :( I wanted to understand the exact reason for this problem, Is it with the rJava or with the SqlRender... because if i run library(rJava) gives me no error... but if i try to install the package SqlRender from github it is building and installing and it is trying to test if the installed package can be loaded or not... there it is finding some issue with rJava. – Phani Kumar Pingali Jun 15 '15 at 09:59
  • Hi Phani.. I am facing a similar issue. If u find the solution please let me know. – Srinath Thota Jun 15 '15 at 12:53
  • 1
    [link] (https://github.com/OHDSI/Achilles/issues/5) is the solution.... – Phani Kumar Pingali Jun 18 '15 at 07:56

1 Answers1

0
install.packages("SqlRender",INSTALL_opts =  "--no-multiarch")

for some reason checks bost 32 and 64bit versions. even though I have correct x64 version of Java 1.8, R it still failed check i386 step. the INSTALL_opts flaf seems to bypass and then no issue

vimuth
  • 5,064
  • 33
  • 79
  • 116