To install from source on Linux, you need to install the mlpack(3.2.2) library:
sudo apt-get install libmlpack-dev
or
sudo apt-get install libboost-math-dev libboost-program-options-dev
libboost-test-dev libboost-serialization-dev libarmadillo-dev binutils-dev
wget https://www.mlpack.org/files/mlpack-3.2.2.tar.gz
tar -xvzpf mlpack-3.2.2.tar.gz
mkdir mlpack-3.2.2/build && cd mlpack-3.2.2/build
cmake -D BUILD_TESTS=OFF -D BUILD_PYTHON_BINDINGS=OFF -D BUILD_CLI_EXECUTABLES=OFF ../
make -j4
sudo make install
sudo ldconfig
And then install the R bindings:
devtools::install_github("Yashwants19/RcppMLPACK")
library(RcppMLPACK)
or
git clone https://github.com/Yashwants19/RcppMLPACK.git
cd RcppMLPACK
make install
R CMD build .
R CMD INSTALL .
R -e 'devtools::test()' #for testing
R CMD check . #for testing
library(RcppMLPACK)
help(testRBinding)
Test RcppMLPACK package with Ctrl + Shift + T(rstudio) or devtools::test()
in the package folder.