Questions tagged [rcpparmadillo]

204 questions
0
votes
1 answer

Undefined symbol error when trying to depend on RcppAmadillo

I am trying to depend on RcppArmadillo in my package but I get an error unable to load shared object /tmp/Rtmp0LswYZ/Rinst82cbed4eaee/00LOCK-alt.raster/00new/alt.raster/libs/alt.raster.so: undefined symbol: dsyev_ when I try to run the command R CMD…
Vijay
  • 151
  • 1
  • 11
0
votes
1 answer

RCPP Armadillo: Print integer value in function

New to CPP and RCPP I am putting together an R package with RCPP. Here are my steps: Transfer to directory with package. Run compileAttributes(pkgdir = ".",verbose=TRUE) Then run build and install from devtools. I want one of my CPP functions to…
pythOnometrist
  • 6,531
  • 6
  • 30
  • 50
0
votes
1 answer

optimize matrix multiplication in for loop RcppArmadillo

The aim is to implement a fast version of the orthogonal projective non-negative matrix factorization (opnmf) in R. I am translating the matlab code available here. I implemented a vanilla R version but it is much slower (about 5.5x slower) than the…
Krrr
  • 452
  • 1
  • 3
  • 15
0
votes
0 answers

Apply a function rowwise in Rcpp/RcppArmadillo

I have a function which takes a vector as input and outputs a scalar and I want to apply this function to a number of observations. The data is structured in a matrix (rows are the number of observations and columns the variables) and the function…
Syd Amerikaner
  • 195
  • 1
  • 8
0
votes
1 answer

Pass a parallel safe RNG to function

Let me provide some context cause I am not sure if have over or under simplified the problem. There exists parallel workers, that preform a series of bootstraps, each worker has its own RNG, std::mt19937 mersene twister. I would like add some…
skatz
  • 115
  • 7
0
votes
0 answers

Debug Rcpp with ldbb: variables not available

I'm making a package with RcppArmadillo under the latest version of Rstudio (1.3.959) and R (4.0.0). Consider the following minimal example, which create the package…
infophile
  • 21
  • 2
0
votes
0 answers

Problem installing rugarch package on MacOSx with error 'make: *** [RcppArmadillo.o] Error 127'

I'm trying to install the package, rugarch, for a class. I am using MacOS Mojave 10.14.6 (18G3020). I am using RStudio: R version 3.5.1 (2018-07-02) -- "Feather Spray" Copyright (C) 2018 The R Foundation for Statistical Computing Platform:…
0
votes
2 answers

RcppArmadillo undefined symbol: dpotrf_ in Travis build

I have looked at many other posts related to this issue and have tried each solution. None have worked in my case, including copying over the makevars from Rcpp. Anyhow, when building on Travis I get the following error undefined symbol:…
D_Williams
  • 103
  • 3
0
votes
1 answer

operation between uword and integer in RcppAmadillo

I am submitting an R package to biocondutor, which contains some RcppArmadillo codes. I got some complaints from one platform for the operation between uword and int. In the following, drop_bin(0) is uword and bin_number is an integer. This error…
0
votes
0 answers

How to install RcppArmadillo in Spark EMR cluster?

I have SSHed into the master node of an EMR cluster and I am trying to install RcppArmadillo library. My configs are - Release label:emr-5.28.0 Hadoop distribution:Amazon 2.8.5 Applications:Hive 2.3.6, Spark 2.4.4 and here is the sessionInfo() >…
Regressor
  • 1,843
  • 4
  • 27
  • 67
0
votes
1 answer

ERROR: undefined reference to `sdot_' when using arma::dot

I use Rcpp::sourceCpp("test.cpp") and it output the following error information. Note that check1() works and check2 fails. The difference is "arma::vec" and "arma::fvec". The error happens when I tried it on a Windows. When I tried it on linux, it…
Wenjian Bi
  • 11
  • 3
0
votes
0 answers

Better way to generate samples from beta distribution in Rcpp

I want to generate a random vector, all the elements in the vector are from a beta distribution. Since there is no such function in armadillo. My current solution is to use rbeta function(ftest1 & ftest2). But is seems super time-consuming compare…
Xia.Song
  • 416
  • 3
  • 15
0
votes
0 answers

error: normcdf(): C++11 compiler required

normcdf() is a function from RcppArmadillo, I can use it successfully from sourceCpp() in command line. If I am trying to compile my own R package, the compile does not return any error. However, if I am using this function, it returned the…
Mo Li
  • 1
  • 1
0
votes
1 answer

Does C++ STL sort check for NaN?

I was using the sort function in Armadillo library but it kept firing NaN errors which were nonexistent when I checked manually... So I switched to STL sort function and it worked! So my curiosity is, how does STL sort function treat NaNs?
0
votes
0 answers

Subset and assignment in an arma matrix

I am trying to assign values to specific rows and columns of a matrix using Rcpp and Armadillo. This is the sort of subsetting and assignments that I am trying to do: mat = matrix(1:15, nr=3) r = i = 1; j = 3 mat[r, i:j] = mat[r, j:i] mat[r,…
user2957945
  • 2,353
  • 2
  • 21
  • 40