Package: armadillo4r 15.4.2

armadillo4r: An 'Armadillo' Interface

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".

Authors:Mauricio Vargas Sepulveda [aut, cre], Jonathan Schneider Malamud [ctb], Conrad Sanderson [aut]

armadillo4r_15.4.2.tar.gz
armadillo4r_15.4.2.zip(r-4.7-any)armadillo4r_15.4.2.zip(r-4.6-any)armadillo4r_15.4.2.zip(r-4.5-any)
armadillo4r_15.4.2.tgz(r-4.6-any)armadillo4r_15.4.2.tgz(r-4.5-any)
armadillo4r_15.4.2.tar.gz(r-4.7-any)armadillo4r_15.4.2.tar.gz(r-4.6-any)
armadillo4r_15.4.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
armadillo4r/json (API)

# Install 'armadillo4r' in R:
install.packages('armadillo4r', repos = c('https://pachadotdev.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pachadotdev/armadillo4r/issues

On CRAN:

Conda:

armadillocpplinear-algebra

7.76 score 1 stars 22 packages 1 scripts 2.6k downloads 4 exports 1 dependencies

Last updated from:fbbeb6a7ca. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK140
source / vignettesOK258
linux-releaseOK175
macos-releaseOK122
macos-oldrelOK95
windows-develOK92
windows-releaseOK96
windows-oldrelOK93
wasm-releaseOK102

Exports:armadillo_versionpkg_templateunvendorvendor

Dependencies:cpp4r

01 - Basic 'armadillo4r' usage
Ordinary Least Squares | Additional Examples | References

Last update: 2026-08-13
Started: 2026-08-13

02 - Armadillo configuration

Last update: 2026-08-13
Started: 2026-08-13

03 - Converting between R and Armadillo types
R to Armadillo | Matrices | Vectors | Cubes | Fields | Armadillo to R | Generic conversion with cpp4r::as_sexp() | References

Last update: 2026-08-13
Started: 2026-08-13

04 - Syntax comparison for MATLAB/Octave users
Matlab/Octave syntax and corresponding Armadillo syntax

Last update: 2026-08-13
Started: 2026-08-13

05 - Sparse matrices
Supported sparse matrix classes

Last update: 2026-08-13
Started: 2026-08-13

06 - Matrix, vector, cube and field classes
Dense matrix class | Constructors | Advanced constructors | Examples | Column vector class | Row vector class | Cube class | Field class | Caveat | Member Functions and Variables | Attributes | Element/object access | Caveats | Element initialisation | Zeros | Ones | Eye | Random uniform | Normal distribution | Fill | Imbue | Clean | Replace | Clamp | Transform | For each | Set size | Reshape | Resize | Copy size | Reset | Submatrix views | Contiguous views for matrix | Contiguous views for vector | Non-contiguous views for matrix or vector: | Subcube views and slices | Contiguous views for cube | Non-contiguous views for cube | Subfield views | Diagonal | Each col | Each row | Form 1 | Form 2 | Form 3 | Each slice | Form 4 | Examples: | Set real | Set imaginary | Insert columns | Insert rows | Insert slice | Shed columns | Shed rows | Shed slices | Swap columns | Swap rows | Swap | Memory pointer | Column pointer | Iterators | Member functions | Iterator types | Compatibility container functions | Convert matrix to column | Convert matrix to row | Convert column to matrix | Convert sparse matrix to dense matrix | Dense matrix and vector transposition | Sparse matrix transposition | Matrix inversion | Maximum and minimum | Linear index of maximum and minimum | In-range | Is empty | Is vector/column vector/row vector | Is sorted | Is upper triangular/lower triangular | Is diagonal | Is square | Is symmetric | Is hermitian | Is symmetric/hermitian positive definite | Is zero | Is finite | Has infinity | Has not-a-number

Last update: 2026-08-13
Started: 2026-08-13

07 - Member functions and variables
Attributes | Examples | Element/object access | Caveats | Element initialisation | Zeros | Ones | Eye | Random uniform | Normal distribution | Fill | Imbue | Clean | Caveat | Replace | Clamp | Transform | For each | Set size | Reshape | Resize | Copy size | Reset | Submatrix views | Contiguous views for matrix | Contiguous views for vector | Non-contiguous views for matrix or vector: | Subcube views and slices | Contiguous views for cube | Non-contiguous views for cube | Subfield views | Diagonal | Each col | Each row | Form 1 | Form 2 | Form 3 | Each slice | Form 4 | Examples: | Set real | Set imaginary | Insert columns | Insert rows | Insert slice | Shed columns | Shed rows | Shed slices | Swap columns | Swap rows | Swap | Memory pointer | Column pointer | Iterators | Member functions | Iterator types | Compatibility container functions | Convert matrix to column | Convert matrix to row | Convert column to matrix | Convert sparse matrix to dense matrix | Dense matrix and vector transposition | Sparse matrix transposition | Matrix inversion | Maximum and minimum | Linear index of maximum and minimum | In-range | Is empty | Is vector/column vector/row vector | Is sorted | Is upper triangular/lower triangular | Is diagonal | Is square | Is symmetric | Is hermitian | Is symmetric/hermitian positive definite | Is zero | Is finite | Has infinity | Has not-a-number

Last update: 2026-08-13
Started: 2026-08-13

08 - Functions of vectors, matrices, and cubes
Absolute value | Examples | Accumulate (sum) all elements | Affine matrix multiplication | Check whether all elements are non-zero, or satisfy a relational condition | Check whether any element is non-zero, or satisfies a relational condition | Approximate equality | Phase angle of each element | Convert 1x1 matrix to pure scalar | Obtain clamped elements according to given limits | Example | Condition number of matrix | Caveat | Obtain complex conjugate of each element | Convert/cast between matrix types | Cross product | Cumulative sum | Cumulative product | Determinant | Generate diagonal matrix from given matrix or vector | Extract specified diagonal | Generate a dense matrix with diagonals specified by column vectors | Differences between adjacent elements | Dot product | Obtain distance of each element to next largest floating point representation | Matrix exponential | Caveats | Matrix exponential of symmetric matrix | Find indices of non-zero elements, or elements satisfying a relational condition | Find indices of finite elements | Find indices of non-finite elements | Find indices of NaN elements | Find indices of unique elements | Flip matrix left to right or upside down | Extract imaginary/real part | Convert linear index to subscripts | Indices of extremum values | In-place dense transpose | Find common elements in two vectors/matrices | Concatenation of matrices | Concatenation of cubes | Kronecker tensor product | Log determinant | Log determinant of symmetric positive definite matrix | Matrix logarithm | Matrix logarithm of symmetric matrix | Return extremum values | Return non-zero values | Various norms of vectors and matrices | Fast estimate of the matrix 2-norm | Normalise vectors to unit p-norm | Element-wise power | Matrix power | Product of elements | Rank of matrix | Reciprocal condition number | Replicate elements | Replicate matrix in block-like fashion | Change size while keeping elements | Change size while keeping elements and preserving layout | Reverse order of elements | Roots of polynomial | Shift elements | Randomly shuffle elements | Obtain dimensions of given object | Sort elements | Vector describing sorted order of elements | Generate a sparse matrix with diagonals specified by column vectors | Square root of matrix | Square root of symmetric matrix | Sum of elements | Convert subscripts to linear index | Generate symmetric matrix from given matrix | Sum of diagonal elements | Transpose of matrix | Trapezoidal numerical integration | Copy upper/lower triangular part | Obtain indices of upper/lower triangular part | Return unique elements | Obtain vector norm of each row or column of a matrix | Flatten matrix into vector | Miscellaneous element-wise functions: exp, log, sqrt, round, sign, and others | Trigonometric element-wise functions: cos, sin, tan, and others

Last update: 2026-08-13
Started: 2026-08-13

09 - Generated vectors, matrices, and cubes
Generate vector with linearly spaced elements | Examples | Caveat | Generate vector with logarithmically spaced elements | Generate vector with regularly spaced elements | Caveats | Generate vector with random permutation of a sequence of integers | Generate identity matrix | Generate object filled with ones | Generate object filled with zeros | Generate object with random values from a uniform distribution | Generate object with random values from a normal/gaussian distribution | Generate object with random values from a gamma distribution | Generate object with random integer values in specified interval | Generate sparse identity matrix | Generate sparse matrix with non-zero elements set to one | Generate sparse matrix with non-zero elements set to random values from a uniform distribution | Generate sparse matrix with non-zero elements set to random values from a normal/gaussian distribution | Generate Toeplitz matrix

Last update: 2026-08-13
Started: 2026-08-13

10 - Decompositions, factorisations, inverses and equation solvers (dense matrices)
Cholesky decomposition of symmetric matrix | Examples | Eigen decomposition of a symmetric matrix | Eigen decomposition of a general matrix | Eigen decomposition for a pair of general matrices | Upper Hessenberg decomposition | Inverse of a general matrix | Inverse of a symmetric positive definite matrix | Lowe-upper decomposition with partial pivoting | Find the orthonormal basis of the null space of a matrix | Find the orthonormal basis of the range space of a matrix | Moore-Penrose pseudo-inverse | QR decomposition | Economic QR decomposition | Generalized Schur decomposition | Schur decomposition of a square matrix | Solve a system of linear equations | Singular value decomposition | Economic singular value decomposition | Sylvester equation solver | References

Last update: 2026-08-13
Started: 2026-08-13

11 - Decompositions, factorisations, inverses and equation solvers (sparse matrices)
Eigen decomposition of a symmetric matrix | Examples | Eigen decomposition of a general matrix | Truncated singular value decomposition | Solve a system of linear equations | Factorise a sparse matrix for solving linear systems

Last update: 2026-08-13
Started: 2026-08-13

12 - Statistics and clustering
Mean | Examples | Median | Standard deviation | Variance | Range | Covariance | Correlation | Histogram | Histogram of counts with user specified edges | Quantiles of a dataset | Principal component analysis (PCA) | Probability density function of normal distribution | Caveat | Probability density function of log-normal distribution | Cumulative distribution function of normal distribution | Random vectors from multivariate normal distribution | Random numbers from chi-squared distribution | Random matrix from Wishart distribution | Random matrix from inverse Wishart distribution | Cluster data into disjoint sets | Caveats | Probabilistic clustering and likelihood calculation via mixture of Gaussians

Last update: 2026-08-13
Started: 2026-08-13

13 - Signal and image processing
One-dimensional convolution | Examples | Two-dimensional convolution | Caveats | One-dimensional Fast Fourier Transform | Two-dimensional Fast Fourier Transform | One-dimensional interpolation | Two-dimensional interpolation | Find polynomial coefficients for data fitting | Evaluate polynomial

Last update: 2026-08-13
Started: 2026-08-13

14 - Saving and loading Armadillo objects on C++ side
Saving and loading matrices and cubes | Caveats | Examples

Last update: 2026-08-13
Started: 2026-08-13

15 - Using SEXP with Armadillo data types

Last update: 2026-08-13
Started: 2026-08-13

16 - Fitting regressions with Armadillo
Linear regression | Design matrix and response vector | Estimating the regression coefficients in R | Estimating the regression coefficients in Armadillo | Poisson regression

Last update: 2026-08-13
Started: 2026-08-13

17 - Miscellaneous
Constants | Wall clock | Examples | Random number generator | Unsigned and signed integers | Short forms for complex data types

Last update: 2026-08-13
Started: 2026-08-13