R bindings for the xtensor C++ multi-dimensional array library.
-
xtensor
is a C++ library for multi-dimensional arrays enabling numpy-style broadcasting and lazy computing. -
xtensor-r
enables inplace use of R arrays in C++ with all the benefits fromxtensor
- C++ universal functions and broadcasting
- STL - compliant APIs.
- A broad coverage of numpy APIs (see the numpy to xtensor cheat sheet).
xtensor-r
can be used either to author C++ extensions for R with Rcpp, or applications that embed the R interpreter with RInside.
xtensor-r
has been packaged for CRAN (The Comprehensive R Archive Network). It can be installed
install.packages("xtensor")
xtensor-r
is primarily a C++ library that can be installed classically using cmake in any installation prefix. For example, on unix systems
cmake -D CMAKE_INSTALL_PREFIX=/prefix/path/ .
make
make install
A tarball for the R package archive network (CRAN) can be generated.
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/prefix/path/ ..
make
make cran
The generated tarball vendors the headers of the core xtensor
library. It can be installed with
install.packages('xtensor_0.1.0-0.tar.gz')
The package can be tested with a simple function call.
library('xtensor')
xtensor::rcpp_hello_xtensor(4:12)
xtensor-r
depends on the xtensor
and Rcpp
libraries
xtensor-r |
xtensor |
Rcpp |
---|---|---|
master | ^0.11.2 | ^0.12.11 |
- Core
xtensor
headers are vendored in the CRAN package. - When using the conda, or debian package managers, xtensor-r has a dependency on xtensor.
We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.
This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.