Dear Rcpp-Experts,
trying to optimize my algorithm I face the question wether a lookup by
a string key like e.g.
myRcppList( "my_entry" ) is as fast as the lookup in std::maps?
That said, would you recommend converting myRcppList to a std::map
before searching it?
Thank you for your help in adv
Dear Dirk,
many thanks for the provided solution.
Cheers!
2014-07-22 13:35 GMT+02:00 Dirk Eddelbuettel :
>
> On 22 July 2014 at 12:59, Asis Hallab wrote:
> | Dear Rcpp-Experts,
> |
> | how can I get the equivalent of the R expression
> |
> | my.df <- data.frame( …
Dear Rcpp-Experts,
how can I get the equivalent of the R expression
my.df <- data.frame( …, stringsAsFactors=FALSE )
in Rcpp?
I have this code in Rcpp:
…
return( DataFrame::create(
Named( "acc" ) = accsCol,
Named( "ec" )= ecCol,
Named( "prot.acc" ) = protC
Dear Rcpp-Experts,
in Rcpp I want to quickly identify matching rows in a data.frame.
In R I would do the following:
matching.rows <- my.data.frame[ which(
my.data.frame$column.of.interest == 'value_of_interest' ), ]
How to do something similar in Rcpp?
If I am not mistaken R data.frames and mat
Dear Rcpp experts,
I need to select all unique un-ordered pairs from a two column table.
Here each row represents a pair and
two rows, un-ordered pairs p and q are identical if
either first and second elements of p and q are identical, respectively,
or if first element of p is identical to second
Dear Rcpp experst,
I hope everyone has had a pleasant Xmas.
I am just wondering what would be the recommended and most efficient way to
check, if a Rcpp Vector contains a given element?
If I am not mistaken the C++ standard approach for very large std::vectors
would be to first sort them and the
= 1.0 - compAnnoMutProb;
> cpt( _, i ) = colmn;
> I think, you could write this immediately into 'cpt'?
>
> 8) Use instruments for testing: A very good introduction and an overview can
> be found on the website of the HPC-Cluster in Aachen (to which by the way
> you
Dear Rcpp Experts,
two simple and short questions:
Do I always have to use SEXP arguments, if I want the method to be
callable from R through the .Call( … ) function?
Does the return type have to be a SEXP, too, or can I use any Rcpp
class instead?
Kind regards!
Dear Dirk, Simon and Rcpp Experts.
This is a message following up the thread about using OpenMP
directives with Rcpp to construct probability matrices in parallel.
I followed Dirk's hint and implemented the parallel matrix generation
using just C++'s STL and the "#pragma omp parallel for" for the
Dear Dirk Eddelbuettel, Romain Francois and contributors,
Dear Rcpp Experts!
It is time to praise you and express my thanks.
I had a very annoying problem generating up to a 300 square matrices
each of sizes up to 500*500 cells. Computing their numeric cell
entries took for ages, even when done u
Dear Simon,
thank you very much for your insights and offer to help.
I prepared a very small project on github:
https://github.com/asishallab/PhyloFun_Rccp
You'll find installation and test instructions as well as references
to the file containing the OpenMP using C++ code.
Your help is much ap
Dear Dirk and Simon,
thank you very much for your help.
I have made a few experiments and am very puzzled. Maybe I could
bother you with advise on this?
The experiments on a
#pragma omp parallel for
1) Use private directive on all Rcpp-Objects that are only accessed to
be read from, and a share
Dear Rcpp Experts,
in my current project I wanted to make use of OpenMP.
Unfortunately it seems Rcpp Objects cannot be used inside a block
executed in parallel.
Seg fault errors are the consequence, according to Dirk's reply in this thread
http://lists.r-forge.r-project.org/pipermail/rcpp-devel/20
Dear Dirk, Dale and Rcpp advisors,
thank you very much for your help.
Finally with your help the source of my problem could be identified.
It was the way I reloaded the newly build and changed package.
Searching the web I had found the following R command sequence to
reload a package:
detach( 'p
Dear Dirk, Hadley and Rccp Experts,
thank you very much for your input.
Unfortunately I still cannot solve my problem.
I took Dirk's advise and used Rcpp.package.skeleton(name="foobar") to
create a new Hello-World package.
Then I build and installed it with
R CMD INSTALL foobar/
>From an interac
Dear Rcpp Experts,
hopefully this question of mine is not too stupid.
Well, I am a greenhorn with Rcpp and my C/C++ expertise is quite dusty.
I generated a new Rccp package and changed the hello_world function.
The attached Rcpp Code stops working if I rename the method
"rcpp_hello_world" to
"co
Many thanks to Dirk and Brian!
The tips helped me a lot.
Kind regards!
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Dear R experts,
recently I started developing a Rcpp package "OpenMPTest".
Within that package I want to use OpenMP, as in the following code example:
// header file
#include
using namespace Rcpp ;
RcppExport SEXP testOpenMP( SEXP nThreads ) ;
// cpp file
SEXP testOpenMP( SEXP nThreads ) {
BE
18 matches
Mail list logo