| Type: | Package |
| Title: | An 'Armadillo' Interface |
| Description: | Provides function declarations and inline function definitions that facilitate communication between R and the 'Armadillo' 'C++' library for linear algebra and scientific computing. This implementation is derived from Vargas Sepulveda and Schneider Malamud (2024) <doi:10.1016/j.softx.2025.102087>. The shipped version of the 'Armadillo' library is version 15.4.2 "Medium Roast Agave". |
| Version: | 15.4.2 |
| Imports: | cpp4r |
| Suggests: | Matrix, tinyroxygen, tinytest, litedown, rbibutils |
| License: | Apache License 2.0 |
| URL: | https://pacha.dev/armadillo4r/, https://github.com/pachadotdev/armadillo4r |
| BugReports: | https://github.com/pachadotdev/armadillo4r/issues |
| Depends: | R(≥ 4.0.0) |
| Encoding: | UTF-8 |
| VignetteBuilder: | litedown |
| NeedsCompilation: | no |
| Packaged: | 2026-08-23 10:34:32 UTC; pacha |
| Author: | Mauricio Vargas Sepulveda
|
| Maintainer: | Mauricio Vargas Sepulveda <m.vargas.sepulveda@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-08-23 15:20:10 UTC |
An 'Armadillo' Interface
Description
Provides function declarations and inline function definitions that facilitate communication between R and the 'Armadillo' 'C++' library for linear algebra and scientific computing. This implementation is derived from Vargas Sepulveda and Schneider Malamud (2024) <doi:10.1016/j.softx.2025.102087>.
Get Armadillo version
Description
Provides the Armadillo C++ library version name and number included in the package.
Usage
armadillo_version()
Value
A string with the Armadillo version name and number
Examples
armadillo_version()
Check that cpp4r can be used
Description
Check that cpp4r can be used
Usage
check_cpp4r()
Value
integer value
Start a new project with the armadillo4r package template
Description
Copies a package template into a new directory. The template includes a DESCRIPTION file, a minimal R/ directory and placeholders with instructions. You can then edit these files to customize your new package.
Usage
pkg_template(path = NULL, pkgname = NULL)
Arguments
path |
Path to the new project |
pkgname |
Name of the new package |
Value
The file path to the copied template (invisibly).
Examples
# create a new directory
dir <- paste0(tempdir(), "/", gsub("\\s+|[[:punct:]]", "", Sys.time()))
dir.create(dir)
# copy the package template into the directory
pkg_template(dir, "mynewpkg")
Unvendor the armadillo4r headers
Description
Removes the vendored armadillo4r headers from your package by automatically finding the vendored headers.
Usage
unvendor(path = NULL)
Arguments
path |
The directory with the vendored headers (e.g., |
Value
The path to the unvendored code (invisibly).
Examples
# create a new directory
dir <- paste0(tempdir(), "/", gsub("\\s+|[[:punct:]]", "", Sys.time()))
dir.create(dir, recursive = TRUE)
# vendor the armadillo4r headers into the directory
vendor(dir)
# unvendor the armadillo4r headers from the directory
unvendor(dir)
Vendor the cpp4r and armadillo4r headers
Description
Vendors armadillo4r into your package by copying the armadillo4r
headers into the inst/include folder of your package and adding
'armadillo4r version: XYZ' to the top of the files, where XYZ is the version of
armadillo4r currently installed on your machine.
Note: vendoring places the responsibility of updating the code on
you. Bugfixes and new features in armadillo4r will not be available for your
code until you run cpp_vendor() again.
Usage
vendor(path = NULL)
Arguments
path |
The directory with the vendored headers. It is recommended to use
|
Value
The path to the vendored code (invisibly).
Examples
# create a new directory
dir <- paste0(tempdir(), "/", gsub("\\s+|[[:punct:]]", "", Sys.time()))
dir.create(dir, recursive = TRUE)
# vendor the armadillo4r headers into the directory
vendor(dir)