Search Archives
Search tips
from:Name
Search by author name, e.g. from:Duncan Murdoch
"exact phrase"
Match an exact phrase
word1 word2
Match messages containing both words
Date range
Use the date pickers to filter results to a time period
Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.
Hi all, I was experimenting with templates and Rcpp and trying to compile this code: // [[Rcpp::export]] static void readVector(Vector<INTSXP> v){ traits::storage_type<INTSXP>::type i = v[0]; Rcout << i << std::endl; } I got this error: scratchpad...
Dear Rcpp developers, I am optimizing some R code by replacing some loops with Rcpp code. After some profiling, it looks like the cpp function below is still the limiting step. Does anybody see some possible source of inefficiency or...
Dear all, we are excited to announce the availability of the new package "bamsignals". The purpose of this package is to ease the calculation of read counts from BAM files by skipping the step of loading the reads in R...
Dear All, When creating a large matrix with the follwing code: #include <Rcpp.h> // [[Rcpp::export]] Rcpp::IntegerMatrix makeMat(int nrow, int ncol){ Rcpp::IntegerMatrix mat(nrow, ncol); return mat; } I get the error: Error in .Primitive(".Call")(<pointer: 0x7f86936d3ea0...
Hi all, I have very little experience with Rcpp and also with c++, so I am sorry if my question might be too stupid. I am trying to use iterators in my code, because I understand them better than vectors...
Dear bioc-coders, it's a long time I don't push an update to my package "bamsignals" so that I almost forgot how to do that :D I have a doubt about version numbers. Currently the GitHub repository, which...
Dear all, I have another one of my stupid questions. Suppose that for any reason I want to define my own vector class like this: @@@@@@@@@@@@@@@@@ template<typename T> struct Vec { T* ptr; int len; }; @@@@@@@@@@@@@@@@@ so, without owning memory but just...
Dear all, the following is not about "how to make it work", because it already works, it is only about "what's the best, cleanest way of doing it". I have an s4 object with three slots, and many Rcpp...
What is exactly "the old school way"? 1. Hacking the automatically generated RcppExports.cpp by adding that line? 2. Keeping the SEXP in the function definitions and converting them manually one-by-one? That's surprising... that this feature works...
Hi all, I got another segfault using Rcpp. It is very difficult to understand where it happens and to reduce it to a minimal example, so for now I am not posting very precise code here, but I have a...
Ok I was able to find the code causing the bug. So it looks like the pointers you get from an Rcpp::Vector using .begin() become invalid after that the Rcpp::Vector goes out of scope (and this makes sense...
Dear all, I'm trying to write some efficient code for analyzing sequencing data in R. To do this I would like to use the C library samtools. I've created a package where the src directory looks like this...
You are right, now the code compiles! But why? I understand that data is stored in column major. However I hoped that using an iterator I would abstract away from how the data is stored and that the function that...
It's great that R and Rcpp have support for long vectors! that makes my life so much easier! So I installed Rcpp version 0.12.1 and the error is still there (see end of the email). If I...
Dear All, first of all thanks again for Rcpp, I am becoming more and more dependent on it and I am filling my directories with .cpp scripts... I have a Rcpp package P using some header file F.hpp in...
Ah wait, my bad (as always T.T), I found a much simpler explanation: colset <- sample(3e7-nr, 1e7) storage.mode(colset) [1] "integer" storage.mode(colset-1) [1] "double" So when I was unwrapping colset I allocated new memory...
As Sean O'Riordain correctly pointed out, I used the install_github command improperly. Doing devtools::install_github("RcppCore/Rcpp") works and the big matrix is allocated correctly. Thanks for the help and for the great work you are doing...
I got another error when using the Matrix.column() function, as in the code below: #include <Rcpp.h> #include "array.cpp" // [[Rcpp::export]] Rcpp::IntegerMatrix makeMat(int nrow=18, int ncol=136633572){ Rcpp::IntegerMatrix mat(nrow, ncol); for (int i...
Sorry, I read this post just by chance, did I understand correctly, the class Rcpp::Matrix are not thread safe? Is there any problem in writing code such as: mat(i,j) = something in a multithreaded environment (such as inside...
I like the "Strict mode" idea, I will use it, thanks! On Wed, Feb 12, 2014 at 2:34 PM, Romain Francois <romain at r-enthusiasts.com> wrote: > > Le 12 f?vr. 2014 ? 13:36, Alessandro Mammana <mammana at molgen...
Can't find what you're looking for? Try searching with Google .