[Rcpp-devel] [ANN] Rcpp 0.9.11

2012-06-25 Thread Dirk Eddelbuettel
Rcpp 0.9.12 is now on CRAN -- it's somewhat of a brown-bag fix as I had essentially left two empty constructors in Rcpp::Environment when making a small stylistic changed flagged by clang++. Nothing like getting an email from BDR telling me I broke my own package as this slipped by all unit tests

Re: [Rcpp-devel] access to element of generic data frame

2012-06-25 Thread Dirk Eddelbuettel
On 25 June 2012 at 17:43, Antonio Piccolboni wrote: | Hi, |  is there a a way to access a specific element of a data frame in Rcpp without | previous knowledge of the type of the columns? I see from RcppExamples that one | can do something like: | | // construct the data.frame object | Rcpp::Dat

[Rcpp-devel] access to element of generic data frame

2012-06-25 Thread Antonio Piccolboni
Hi, is there a a way to access a specific element of a data frame in Rcpp without previous knowledge of the type of the columns? I see from RcppExamples that one can do something like: // construct the data.frame object Rcpp::DataFrame DF = Rcpp::DataFrame(Dsexp); // and access each column by nam

Re: [Rcpp-devel] Persistent C++ objects within R/Rcpp?

2012-06-25 Thread Dirk Eddelbuettel
Andy, On 25 June 2012 at 16:38, Andy Garcia wrote: | First, thank you to the Rcpp team for their work on Rcpp. It's an incredible | resource to get C++ code executing from R. | | I've worked through setting up the correct development environment (Ian | Fellow's post on Eclipse + Rcpp was great w

Re: [Rcpp-devel] Using sparse matrices from the Matrix package in Rcpp

2012-06-25 Thread Andreas Alfons
> To me it seems that I can not acces entries (i,j) using A(i,j) when A is a > sparse matrix. Is that so? - and if yes, any suggestions on what I can do > alternatively? Take a look at the coeff() method, e.g., A.coeff(i,j) See also its documentation: http://eigen.tuxfamily.org/dox-devel/classE

Re: [Rcpp-devel] Using sparse matrices from the Matrix package in Rcpp

2012-06-25 Thread Søren Højsgaard
I am trying to extract elements from a sparse matrix using RcppEigen by a function called Aiijj (to mimic A[ii,jj]). I do library(inline) library(RcppEigen) src <- ' using Eigen::Map; using Eigen::SparseMatrix; using Eigen::MappedSparseMatrix; using Eigen::VectorXd; using namespace Rcpp; typedef

Re: [Rcpp-devel] Persistent C++ objects within R/Rcpp?

2012-06-25 Thread Douglas Bates
On Mon, Jun 25, 2012 at 3:38 PM, Andy Garcia wrote: > First, thank you to the Rcpp team for their work on Rcpp. It's an incredible > resource to get C++ code executing from R. > > I've worked through setting up the correct development environment (Ian > Fellow's post on Eclipse + Rcpp was great wi

[Rcpp-devel] Persistent C++ objects within R/Rcpp?

2012-06-25 Thread Andy Garcia
First, thank you to the Rcpp team for their work on Rcpp. It's an incredible resource to get C++ code executing from R. I've worked through setting up the correct development environment (Ian Fellow's post on Eclipse + Rcpp was great with a few tweaks for a Linux install) as well some of the examp

Re: [Rcpp-devel] Using sparse matrices from the Matrix package in Rcpp

2012-06-25 Thread Douglas Bates
On Sun, Jun 24, 2012 at 1:19 PM, Dirk Eddelbuettel wrote: > > On 24 June 2012 at 19:56, Glenn Lawyer wrote: > | I would suggest using the eigen library, Rccp has an interface to this. > | Alternately, you could link to the boost graph library. > > Spot on. > > It was in fact the availability of (m