[R-SIG-Finance] racd installation

Dirk Eddelbuettel edd at debian.org
Wed Sep 21 13:19:56 CEST 2016


On 21 September 2016 at 10:48, Le Hai Trung KNH wrote:
| Hi,
| I am trying to install 'racd' package of Alexios to R 3.3.1 and come up
| with the following error messages.
| -----
| >  require(devtools)
| Loading required package: devtools
| > install_bitbucket("alexiosg/racd")
| 
| ** preparing package for lazy loading
| Warning in rgl.init(initValue, onlyNULL) :
|   RGL: unable to open X11 display
| Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
| Error : object 'as.vector' is not exported by 'namespace:Matrix'
| ERROR: lazy loading failed for package 'racd'
| * removing '/gpfs/software/R/3.3.1/gcc/lib64/R/library/racd'
| Error: Command failed (1)

There are two errors here.

One comes from the rgl package noticing that you have no X11 display, and
recovering nicely (thanks, Duncan).

The other comes from racd which wants to import as.vector from Matrix, but
Matrix no longer exports it.  Clone the repo, and make this change:

diff --git a/NAMESPACE b/NAMESPACE
index 45b3765..4c146fb 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -6,7 +6,7 @@ importFrom(numDeriv, jacobian, hessian, grad)
 importFrom(xts, xts, as.xts, is.xts, axTicksByTime)
 importFrom(zoo, coredata, index)
 importFrom(Rsolnp, solnp, gosolnp, startpars)
-importFrom(Matrix, Matrix, crossprod, t, as.matrix, as.vector)
+importFrom(Matrix, Matrix, crossprod, t, as.matrix)
 importFrom(parallel, makeForkCluster, makePSOCKcluster, stopCluster, clusterEvalQ, clusterExport, clusterMap, parLapply, parSapply)
 exportClasses("ACDspec", "ACDfit", "ACDfilter", "ACDforecast", "ACDsim", "ACDpath", "ACDroll")
 exportClasses("ACDmultispec", "ACDmultifit", "ACDmultifilter", "ACDmultiforecast")

ie remove ", as.vector" from the end of the importFrom line for package
Matrix.  Now you can install.

| -----
| How could I solve for these errors? By the way, when will the 'racd' could
| be downloaded directly from CRAN?


| 
| Regards,
| Trung
| 
| 	[[alternative HTML version deleted]]
| 
| _______________________________________________
| R-SIG-Finance at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-sig-finance
| -- Subscriber-posting only. If you want to post, subscribe first.
| -- Also note that this is not the r-help list where general R questions should go.

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-SIG-Finance mailing list