I'm trying to generate multinomial random variables as fast as possible. And I learned that gsl_ran_multinomial could be a good choice. However, I tri ...
I'm trying to generate multinomial random variables as fast as possible. And I learned that gsl_ran_multinomial could be a good choice. However, I tri ...
I am developing a package for R and would like to load the functionalities of an R package inside an Rcpp function. I know about Rcpp::Environment en ...
For fastening purpose, i'm trying to convert a simple 'for loop' in R into a Rcpp one. I have a date vector named "date_vector" which is composed by ...
I'm looking for a simple way to build a 3D array using Rcpp and make that array accessible in R. I'm still very new to Rcpp and c++ coding in general, ...
I know that I can run a MPI C++ program using x processors with mpirun: Is it possible to modify a MPI C++ program using Rcpp library such that it ...
One of my projects uses C++11 std::array for fixed-sized array types, and so I'm trying to specialise Rcpp::as() for convenient conversion from SEXP t ...
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 wrote this little C++ function that works like R's sample.int(..., replace =FALSE) function. Essentially it draws from uniformly distributed integer ...
I am trying to create models that involve looping through large multidimensional arrays (ex: dimensions = 20 x 1000 x 60), which run very slow the way ...
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 ...
I'm trying to use a sparse solver as SimplicialLLT to inverse a symmetric positive-definite matrix and return it. I get a matrix from R using Rcpp to ...
I try to use the quantile function in RcppArmadillo, however, in the tutorial, the output of quantile function is arma::vec (The class of output in R ...
I write this Rcpp function: The goal of this function is that: 1) When no input, return "null"; 2) When input TRUE, return "true"; 3) When input FA ...
I want to compare each columns, and return all the results after calculating. I try to write the codes, but the outcome was not resonable. Because if ...
There is a discussion on Rccp-dev discussing how to convert from a string result to a RawVector (see https://lists.r-forge.r-project.org/pipermail/rcp ...
It appears that for larger nnet::multinom multinomial regression models (with a few thousand coefficients), calculating the Hessian (the matrix of sec ...
A parameter with value of -0 in R becomes 0 in C++ world when using Rcpp. Here is a minimal example that demonstrates this. Here is the output: ...
I wish to check that an Rcpp IntegerVector provided to a C++ function does not contain NA values. Following another answer, I have written the below: ...
I am trying to get into using C++ code in my R packages. I created a test package using and I then set up the C++ necessaries using I then creat ...