Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't load rggobi.dll though it appears to be available

Tags:

r

dll

I'm trying to use clusterfly which depends on rggobi.

I load clusterfly and receive this error:

> pacman::p_load(caret, clusterfly, devtools, geonames, inTrees, mclust, party, 
+                RDSTK, reshape, ROCR, RRF, sqldf, stringi, tree, xlsx)
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  unable to load shared object 'C:/Program Files/R/R-3.2.0/library/rggobi/libs/x64/rggobi.dll':
  LoadLibrary failure:  The specified path is invalid.

Failed with error:  ‘package ‘rggobi’ could not be loaded’
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/clusterfly_0.4.zip'
Content type 'application/zip' length 64469 bytes (62 KB)
downloaded 62 KB

package ‘clusterfly’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\hackr\AppData\Local\Temp\RtmpopFKT2\downloaded_packages

clusterfly installed
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  unable to load shared object 'C:/Program Files/R/R-3.2.0/library/rggobi/libs/x64/rggobi.dll':
  LoadLibrary failure:  The specified path is invalid.

Failed with error:  ‘package ‘rggobi’ could not be loaded’
Warning message:
In pacman::p_load(caret, clusterfly, devtools, geonames, inTrees,  :
  Failed to install/load:
clusterfly

which seems to basically say that rggobi.dll is not located where it's supposed to be.

So, I try directly installing and loading rgobbi and get the same error:

> install.packages("rggobi")
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.2/rggobi_2.1.20.zip'
Content type 'application/zip' length 422326 bytes (412 KB)
downloaded 412 KB

package ‘rggobi’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\hackr\AppData\Local\Temp\RtmpopFKT2\downloaded_packages
> require(rggobi)
Loading required package: rggobi
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  unable to load shared object 'C:/Program Files/R/R-3.2.0/library/rggobi/libs/x64/rggobi.dll':
  LoadLibrary failure:  The specified path is invalid.

I find this strange, so I have a look in Windows Explorer and the file rggobi.dll is right where it's supposed to be:

rggobi.dll

After another failed attempt to load it, my next thought is that there could be some sort of file permission problem. So, starting with the rggobi folder, I chmod 777 to set the maximally permissions.

I still can't load the package and I repeated the process of chmod 777 and attempting to require(gobbi) for each successive folder level and directly on rggobi.dll:

C:\Program Files\R\R-3.2.0\library>chmod 777 rggobi
C:\Program Files\R\R-3.2.0\library>cd rggobi
C:\Program Files\R\R-3.2.0\library\rggobi>ls
DESCRIPTION  LICENSE  Meta       NEWS  data  help  libs
INDEX        MD5      NAMESPACE  R     demo  html
C:\Program Files\R\R-3.2.0\library\rggobi>chmod 777 libs
C:\Program Files\R\R-3.2.0\library\rggobi>cd libs
C:\Program Files\R\R-3.2.0\library\rggobi\libs>chmod 777 x64
C:\Program Files\R\R-3.2.0\library\rggobi\libs>chmod 777 i386
C:\Program Files\R\R-3.2.0\library\rggobi\libs>cd x64
C:\Program Files\R\R-3.2.0\library\rggobi\libs\x64>ls
rggobi.dll  symbols.rds
C:\Program Files\R\R-3.2.0\library\rggobi\libs\x64>chmod 777 rggobi.dll

Finally, after opening an issue on Github, Hadley Wickham deferred to a lawremi, who suggested trying 32-bit R, but that also led to the same result.

How can I make this dll/package available to R?

like image 651
Hack-R Avatar asked May 14 '15 18:05

Hack-R


1 Answers

My solution was to follow the instructions below from here

If you also want to install rggobi, you can install everything from within R, with the following command: source("http://www.ggobi.org/downloads/install.r")

like image 56
Jak Avatar answered Sep 24 '22 19:09

Jak