5

I have made a package that uses XLConnect. I can correctly install it here. However, when I try to install it on someone elses PC, I get an .onLoad failed error. At first I got the .onload Failed error also when I did library('rJava'), but after installing the 64-bit version of Java libraray(rJava) now works correctly. However, when trying to install my package I still get the same load error:

Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: dirname(this$RuntimeLib)
  error: a character vector argument expected
Error : package 'XLConnect' could not be loaded
Error: loading failed
Execution halted
*** arch - x64

both library(XLConnect) and library(rJava) work. Is there something else that can cause these types of errors?

Niek de Klein
  • 8,524
  • 20
  • 72
  • 143
  • Why do you use `.onLoad`? If your package is dependent on another package, you should declare this as DEPENDS or IMPORTS in your DESCRIPTION and NAMESPACE. `.onLoad` should not be necessary. – Andrie Jul 09 '14 at 16:11
  • @Andrie I'm not using `.onLoad`, I have it in the DESCRIPTION in `Depends`. This is the error I get when I try to install the package that has `XLConnect` in the DEPENDS. – Niek de Klein Jul 10 '14 at 09:23
  • Do you have this package on github or some other public repository? – Andrie Jul 10 '14 at 09:25
  • @Andrie No I'm installing it from source. The dependent libraries are installed separately before installing the package. – Niek de Klein Jul 10 '14 at 09:28
  • I mean - can I view your code somewhere? – Andrie Jul 10 '14 at 09:28
  • Check out this post: http://stackoverflow.com/questions/7019912/using-the-rjava-package-on-win7-64-bit-with-r/7604469 – dnlbrky Sep 17 '14 at 15:28

0 Answers0