No articles match
01 - Basic 'armadillo4r' usage2 months ago
Ordinary Least Squares | Additional Examples | References
02 - Armadillo configuration2 months ago
03 - Converting between R and Armadillo types2 months ago
R to Armadillo | Matrices | Vectors | Cubes | Fields | Armadillo to R | Generic conversion with cpp4r::as_sexp() | References
04 - Syntax comparison for MATLAB/Octave users2 months ago
Matlab/Octave syntax and corresponding Armadillo syntax
05 - Sparse matrices2 months ago
Supported sparse matrix classes
06 - Matrix, vector, cube and field classes2 months ago
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
07 - Member functions and variables2 months ago
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
08 - Functions of vectors, matrices, and cubes2 months ago
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
09 - Generated vectors, matrices, and cubes2 months ago
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
10 - Decompositions, factorisations, inverses and equation solvers (dense matrices)2 months ago
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
11 - Decompositions, factorisations, inverses and equation solvers (sparse matrices)2 months ago
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
12 - Statistics and clustering2 months ago
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
13 - Signal and image processing2 months ago
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
14 - Saving and loading Armadillo objects on C++ side2 months ago
Saving and loading matrices and cubes | Caveats | Examples
15 - Using SEXP with Armadillo data types2 months ago
16 - Fitting regressions with Armadillo2 months ago
Linear regression | Design matrix and response vector | Estimating the regression coefficients in R | Estimating the regression coefficients in Armadillo | Poisson regression
17 - Miscellaneous2 months ago
Constants | Wall clock | Examples | Random number generator | Unsigned and signed integers | Short forms for complex data types
Reading REDATAM files in R2 months ago
01 - Introduction3 months ago
Motivation | Differences between R's C API and cpp4r | Memory protection | Creating vectors | Type checking and coercion | Strings | Missing values (NA) | Error handling | Lists | Calling R functions from C++ | Environments | External pointers | Matrices | Summary | References
02 - Setup3 months ago
C++ Setup | For Ubuntu Users | R Setup
03 - Package Skeleton3 months ago
Loading the Required R Packages | Creating a Dummy Package | Print a Number | Exporting a Registered Function | Number's Sign | Installing the Package | Good Practice | References
04 - Read-only versus Writable R Objects3 months ago
Read and write | References
05 - Logical Functions3 months ago
Notes | Is any value in a vector 'true'? | Which elements in a vector are 'true'? | Are all values in a vector 'true'? | References
06 - Rolling Functions3 months ago
Notes | Cumulative sum | Cumulative product | Range of values | References
07 - Statistical Functions3 months ago
Notes | Sum | Arithmetic mean | Variance | Root Mean Square Error (RMSE) | References
08 - Logical Functions with Missing Values3 months ago
Notes | Is any value in a vector 'true'? | Which elements in a vector are 'true'? | Are all values in a vector 'true'?
09 - Rolling Functions with Missing Values3 months ago
Notes | Cumulative sum | Cumulative product | Cumulative minimum | Cumulative maximum
10 - Statistical Functions with Missing Values3 months ago
Notes | Sum | Arithmetic mean | Variance | Root Mean Square Error (RMSE)
11 - Debugging R Packages3 months ago
Motivation | Compiler Setup | Testing for Memory Leaks | Adding a configure script | Testing with Docker | References
12 - External Pointers3 months ago
13 - Compiler Optimizations3 months ago
Motivation | User-wide Makevars | Anticonf scripts
14 - Linear Algebra3 months ago
Motivation | Using Armadillo | References
15 - Internals3 months ago
Initial setup and dev workflow | Code formatting | Code organization | Naming conventions | Vector classes | Coercion functions | Protection | Protect list | Unwind Protect
16 - Worked Examples3 months ago
Motivation | Instructional examples | Solving a matrix using the Gauss-Jordan method | Details | Vendoring | Building and testing | Ordinary Least Squares (OLS) estimator | Linear programming (Simplex phase 2) | Algorithm | Numerical example | Using OMP (parallelization) | Enabling OpenMP | Unnamed list | Named list | Implementing a rejection and bootstrap sampler | Extensive R/C++ tests | Useful R/C++ Integration Examples | References
17 - FAQs3 months ago
Is this only compatible with C++11? | Can I specify which C++ standard to use? | My laptop uses C++NN but my cluster uses C++MM, how can I make sure my code works on both? | What are the underlying types of cpp4r objects? | How do I add elements to a list? | Does cpp4r support default arguments? | How do I create a new empty list? | How do I retrieve (named) elements from a named vector/list? | How can I tell whether a vector is named? | How do I return a "cpp4r::writable::logicals" object with only a "FALSE" value? | How do I create a new empty environment? | How do I assign and retrieve values in an environment? What happens if I try to get a value that does not exist? | How can I create a "cpp4r:raws" from a "std::string"? | How can I create a "std::string" from a "cpp4r::writable::string"? | What are the types for C++ iterators? | What's wrong with "using namespace std"? | How do I modify a vector in place? | Should I call "unwind_protect" manually? | Destructors | Nested unwind_protect() | How do I modify a matrix rownames/colnames on C++ side? | How do I use the same seed defined in R for random number generation in C++? | How different is cpp11::function compared to cpp4r::function?
Introduction to tabulapdf2 years ago
Introduction | Basic usage | Specifying the extraction method | Extracting areas | Interactive table extraction | Use case: COVID-19 treatments in Italy | Miscellaneous functionality
Basic usage2 years ago
Introduction | Package data | Available tables | Country codes | Commodity codes | Inflation data | Package functions | Country code | Commodity code | Trade data | Bilateral trade at commodity level (Year - Reporter - Partner - Commodity Code) | Bilateral trade at aggregated level (Year - Reporter - Partner) | Reporter trade at commodity level (Year - Reporter - Commodity Code) | Reporter trade at aggregated level (Year - Reporter) | Commodity trade at aggregated level (Year - Commodity Code) | Inflation adjustment