Installation of the xtensor-r C++ library¶
xtensor-r is a header-only C++ library. We maintain the conda package for xtensor-r and its dependencies.
Besides the xtendor-r headers, all these methods place the cmake project configuration file in the right location so that third-party projects can use cmake’s find_package to locate xtensor-r headers.
Using the conda package¶
A package for xtensor-r is available on the conda package manager.
conda install -c conda-forge xtensor-r
From source with cmake¶
You can also install
xtensor-r from source with cmake. On Unix platforms, from the source directory:
mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/path/to/prefix .. make install
On Windows platforms, from the source directory:
mkdir build cd build cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=/path/to/prefix .. nmake nmake install
Installation of the R package¶
We provide a R package for Xtensor on both conda and CRAN (Comprehensive R Archive Network). The packaging boilerplate for the R package is available at https://github.com/QuantStack/Xtensor.R.
To install the R package with conda:
conda install r-xtensor -c conda-forge
To install the R package from CRAN:
R CMD INSTALL xtensor
or from the GitHub repository using devtools:
A key difference between the version of the R package available on CRAN and conda is that
the CRAN package vendors the headers of
the conda package depends on the conda packages for
When installing the package from CRAN, it is still possible to drop the vendored dependencies by adding the
--configure-args='--novendor' option to the
R CMD INSTALL command, or by defining the
environment variable to