0

I have developed my own R library (called HAM)

When I use the install() command from the library roxygen2, the result looks as shown below:

* installing *source* package 'HAM' ...
** R
** preparing package for lazy loading
Warnung: package 'car' was built under R version 3.1.2
Warnung: package 'gmm' was built under R version 3.1.2
Warnung: package 'MASS' was built under R version 3.1.2
Warnung: package 'fAssets' was built under R version 3.1.2
Warnung: package 'timeDate' was built under R version 3.1.2
Warnung: package 'timeSeries' was built under R version 3.1.2
Warnung: package 'fBasics' was built under R version 3.1.2
Warnung: package 'fPortfolio' was built under R version 3.1.2
Warnung: package 'quantmod' was built under R version 3.1.2
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warnung: package 'car' was built under R version 3.1.2
Warnung: package 'gmm' was built under R version 3.1.2
Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries
*** arch - x64
Warnung: package 'car' was built under R version 3.1.2
Warnung: package 'gmm' was built under R version 3.1.2
Warnung: package 'MASS' was built under R version 3.1.2
Warnung: package 'fAssets' was built under R version 3.1.2
Warnung: package 'timeDate' was built under R version 3.1.2
Warnung: package 'timeSeries' was built under R version 3.1.2
Warnung: package 'fBasics' was built under R version 3.1.2
Warnung: package 'fPortfolio' was built under R version 3.1.2
Warnung: package 'quantmod' was built under R version 3.1.2
ERROR: loading failed for 'i386'
* removing 'C:/Program Files/R/R-3.1.1/library/HAM'
Error: Command failed (1)

My session info is

R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252    LC_MONETARY=German_Switzerland.1252
[4] LC_NUMERIC=C                        LC_TIME=German_Switzerland.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] roxygen2_4.1.0    devtools_1.6.1    xlsx_0.5.7        xlsxjars_0.6.1    gmm_1.5-0         urca_1.2-8       
 [7] tseries_0.10-32   strucchange_1.5-0 sandwich_2.3-2    car_2.0-22        lmtest_0.9-33     openxlsx_2.3.2   
[13] xts_0.9-7         zoo_1.7-11        tis_1.27          lubridate_1.3.3   Rbbg_0.4-155      rJava_0.9-6      

loaded via a namespace (and not attached):
 [1] digest_0.6.8    grid_3.1.1      lattice_0.20-29 MASS_7.3-37     memoise_0.2.1   nnet_7.3-8      plyr_1.8.1     
 [8] quadprog_1.5-5  Rcpp_0.11.3     stringr_0.6.2   tools_3.1.1  

What is the problem? All relevant libraries are installed on my PC, so there should not be an error message claiming that a dependent library is missing.

user2157086
  • 525
  • 1
  • 5
  • 20
  • You need to show us the `DESCRIPTION` and `NAMESPACE` files. Apparently one of your dependencies needs to launch a Java VM, and is unable to do so. Do you have Java SDK installed on your computer? – tchakravarty Jan 26 '15 at 09:25
  • Description file looks as follows Description: The library collects all user-defined functions of Hinder Asset Management. It is work in progress and will expand continuously. Depends: R (>= 3.1.1), PerformanceAnalytics, xts, zoo, lmtest, car, sandwich, strucchange, tseries, urca, gmm, png, grid, Rbbg, openxlsx, xlsx, calibrate, reshape, lubridate, fAssets, fPortfolio, BurStFin, quantmod, tawny License: GPL 3 LazyData: true I do have JRE Version 8, Update 25 installed. – user2157086 Jan 26 '15 at 10:08
  • Please add this to the original post. Based on a quick look through the dependencies, `xlsx` would be a problem. Please add `sessionInfo()` output to your question, and also whether you are able to install and load all the dependencies on your system, outside of the package installation. – tchakravarty Jan 26 '15 at 10:12
  • Thx for help. I was able to track down the problem: one cannot have the two libraries {openxlsx} and {xlsx} being used/loaded in the same library since they interfere with each other. – user2157086 Jan 27 '15 at 08:34

0 Answers0