[Rcpp-devel] public data members in modules

2010-06-10 Thread romain
Hello, I've added "field" and "field_readonly" to allow exposing public data members of a c++ class. For example (from the unit tests): test.Module.member <- function(){ inc <- ' class Num{ public: Num() : x(0.0), y(0){} ; d

Re: [Rcpp-devel] Resolving NativeSymbolInfos from Rcpp

2010-06-10 Thread Davor Cubranic
On 2010-06-08, at 10:46 PM, Romain Francois wrote: >>> Reading the information on writing R extensions, it sounds like there >>> may not be a way to get to the address of an object in another >>> package's DLL. (In this case, in stats.so.) However, there is a >>> NativeSymbolInfo for stats:::R_loe

Re: [Rcpp-devel] Resolving NativeSymbolInfos from Rcpp

2010-06-10 Thread Davor Cubranic
On 2010-06-09, at 12:03 PM, Dirk Eddelbuettel wrote: > ... at a fundamental level, I am not yet sure that 'poking through' an api > that R Core has sealed is the right idea. > > My hunch is that I would just take the code to loess_raw and stick it into a > small utility package so that one coul

Re: [Rcpp-devel] RcppArmadillo questions

2010-06-10 Thread Vinh Nguyen
On Thu, Jun 10, 2010 at 11:00 AM, Dirk Eddelbuettel wrote: > > On 10 June 2010 at 10:35, Vinh Nguyen wrote: > | Thanks Dirk.  I've been using the package skeleton method, and added > | PKG_CXXFLAGS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::CxxFlags()" ) > | $(shell Rscript -e "cat( '-I', > |  sys

Re: [Rcpp-devel] RcppArmadillo questions

2010-06-10 Thread Dirk Eddelbuettel
On 10 June 2010 at 10:35, Vinh Nguyen wrote: | Thanks Dirk. I've been using the package skeleton method, and added | PKG_CXXFLAGS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::CxxFlags()" ) | $(shell Rscript -e "cat( '-I', | system.file('include', package = 'RcppArmadillo'), sep = '' )" ) | | into

Re: [Rcpp-devel] RcppArmadillo questions

2010-06-10 Thread Vinh Nguyen
Thanks Dirk. I've been using the package skeleton method, and added PKG_CXXFLAGS = $(shell $(R_HOME)/bin/Rscript -e "Rcpp:::CxxFlags()" ) $(shell Rscript -e "cat( '-I', system.file('include', package = 'RcppArmadillo'), sep = '' )" ) into the Makevars file per Romain's suggestion. RcppArmadillo:

[Rcpp-devel] RcppArmadillo 0.2.2, Rcpp 0.8.2

2010-06-10 Thread Dirk Eddelbuettel
We're still not really in a habit of announcing releases here (though I try to do so on my blog) so briefly: -- following up on Rcpp 0.8.1, we have a new RcppArmadillo which contains Armadillo 0.9.10, supports the plugin mechanism from inline 0.3.5 and some more fixes -- following up o

Re: [Rcpp-devel] RcppArmadillo questions

2010-06-10 Thread Dirk Eddelbuettel
Vinh, Please have a look at RcppArmadillo 0.2.2 which should helpfully be easier to use in the cases you tried, ie outside of a package. A quick example is on my blog at http://dirk.eddelbuettel.com/blog/ -- Regards, Dirk ___ Rcpp-devel mailing lis

Re: [Rcpp-devel] Checking a condition like any(x < lowerBd)

2010-06-10 Thread Dirk Eddelbuettel
On 10 June 2010 at 10:47, Douglas Bates wrote: | I thought I had had enough coffee this morning not to make really dumb | mistakes but perhaps not. | | I want to check that a particular NumericVector is within a feasible | region defined by lower and upper bounds on each element. For the | lower

[Rcpp-devel] Checking a condition like any(x < lowerBd)

2010-06-10 Thread Douglas Bates
I thought I had had enough coffee this morning not to make really dumb mistakes but perhaps not. I want to check that a particular NumericVector is within a feasible region defined by lower and upper bounds on each element. For the lower bound I am checking for the equivalent of any(x < lowerBd)