Is there any way to efficiently translate the outer() function for multiplication of two vectors from R base to RcppArmadillo? I attempted to do so bu ...
Is there any way to efficiently translate the outer() function for multiplication of two vectors from R base to RcppArmadillo? I attempted to do so bu ...
I am running a simulation using Varying-Coefficient Models, yet there are some adjustments. There is no R package that can do what I am looking for. M ...
I recently wrote a compute intense function in Rcpp. Now, I would like to port this code to an R package. However, I notice that the code is much (~10 ...
In Rcpp/RcppArmadillo I want to do the following: From an n x n matrix A, I would like to extract a submatrix A[-j, -j] where j is a vector of indices ...
I wish to build a package, but I write part of it using RcppArmadillo and now I am suffering the consequences. I am using roxygen2 and devtools to hel ...
I have a matrix A and a vector b, I want to solve the linear system Ax = b for x. The problem is that frequently A will be singular. I used RcppArmadi ...
I have developed a dual chain markov monte carlo model designed to forecast loan portfolios in the excellent package Rcpp but have run into an issue t ...
I am stuck trying to find the indices of elements in a vector x whose elements are also in another vector vals using Rcpp Armadillo. Both x and vals a ...
I have a matrix containing probabilities, with each of the four columns corresponding to a score (an integer in sequence from 0 to 4). I want to sampl ...
I am using RcppArmadillo within an R package. I want to suppress a warning message that occurs in a C++ function due to numerical precision when a sym ...
Consider the following C++ code // [[Rcpp::depends(RcppArmadillo)]] #include <RcppArmadillo.h> // [[Rcpp::export(rng = false)]] void possible_ ...
I am new to building R packages so I need some help :) I am using Rcpp/arrayfire and want a line in my makevars file to detect the users R version. Cu ...
l would like to return objects of different types from the function RcppArmadillo. For example, below is a code where I've tried returning both a vec ...
In an application, I use List to contain some variables (double, arma::mat and other types), and then take the arma::mat component in this list for fu ...
I've long been a user of RcppArmadillo, but have been unable to compile any programs via sourceCpp since upgrading my OS to Monterey Version 12.3. Ge ...
I'm trying to run fastLmPure in a loop, avoiding copying a large matrix. I've pre-allocated the matrix to the size I need, and it's only the last col ...
I am trying to install Fortran on my MacBook MacOS Monterey (version 12.2.1) M1 chip laptop. I downloaded and installed the gfortran from this website ...
I'm frequently using std::map<std::string, arma::vec> in c++ so I wrote custom as and wrap templates to handle the R-C++ conversion. Below is a ...
I have the following toy data - On this data, I am creating two models as below - Finally, I am comparing these models using anova Since I am ...
I am trying to use function RcppArmadillo::fastLM instead of lm for performance reasons. Here is my function call to lm since most of the time is u ...