elbamos / largeVis

An implementation of the largeVis algorithm for visualizing large, high-dimensional datasets, for R
340 stars 62 forks source link

Trying to run: "sourceCpp(sparseneighbors.cpp)" #12

Closed sparrisable closed 8 years ago

sparrisable commented 8 years ago

I am trying to get the sparseneighbors.cpp to work from R by running sourceCpp. It works for largeVis.cpp:

sourceCpp("../src/largeVis.cpp") sourceCpp("../src/sparseneighbors.cpp") Error in dyn.load("/tmp/RtmpVGSEyh/sourcecpp_9ed162156b7/sourceCpp_82706.so") : unable to load shared object '/tmp/RtmpVGSEyh/sourcecpp_9ed162156b7/sourceCpp_82706.so': /tmp/RtmpVGSEyh/sourcecpp_9ed162156b7/sourceCpp_82706.so: undefined symbol: Z13sparseCosDistRKN4arma5SpMatIdEES3

I did update armadillo to the latest version:

install.packages("RcppArmadillo") ... trying URL 'http://ftp.acc.umu.se/mirror/CRAN/src/contrib/RcppArmadillo_0.7.100.3.1.tar.gz' ...

I suspect that there is a reference to something like arma:mat:sparsecosdist() that is not present in my version of armadillo.

I am running on debian.

I am a beginner with R, all advice is welcome. Thank you for putting the largeVis project on github.

elbamos commented 8 years ago

I'm not sure why you are running sourceCpp, but I'm positive that trying to install the package that way won't work. You want to use R's commands to install the package. Assuming you have devtools installed:

devtools::install_github("elbamos/largeVis")
elbamos commented 8 years ago

I'm gonna close this for now. If something else comes up, please create a new issue.

sparrisable commented 8 years ago

Thank you, it worked.

On debian I did (for reference): In bash: sudo apt-get -y build-dep libcurl4-gnutls-dev sudo apt-get -y install libcurl4-gnutls-dev In R: install.packages("devtools") devtools::install_github("elbamos/largeVis") library("largeVis")