[Rcpp-devel] Windows 7 x64 and using Rcpp with gcc 4.8.1

2014-08-22 Thread Wray, Christopher
This may already be common knowledge (apologies if it is), but a quick scan of the (recent) email exchanges did not suggest so, and I have come across a number of partial questions and answers on this same topic. I have been struggling with an annoying lambda/template bug in gcc 4.6.3 : https:

Re: [Rcpp-devel] inline error

2013-10-28 Thread Wray, Christopher
Its just a typo on plugin (no s). And scope Rcpp::wrap. cfunc <- cxxfunction( signature(start="vector"), body = 'Rcpp::NumericVector x(start); return Rcpp::wrap(1);', plugin = "Rcpp" ) extra 's' on parameter plugins or cfunc <- cxxfunction( signature(start="vector"), body = 'using namespace Rc

Re: [Rcpp-devel] Getting the exact arithmetic as in R when Rcpp is used?

2013-07-09 Thread Wray, Christopher
This has already been answered by Dirk and Bill. Although the OPs example can, of course, be reproduced in R, sans Rcpp. I use rep(0.1,9) in place of rep(0.1,10). We can use Rcpp to see various differences explicitly: > options(digits=22) > vx=rep(0.1,9) > vx[1]+vx[2]+vx[3]+vx[4]+vx[5]+vx[6]+v

Re: [Rcpp-devel] R.e. Speed gain assistance (Wray, Christopher)

2011-08-18 Thread Wray, Christopher
d sorry for the unclear post! Thanks From: rcpp-devel-boun...@r-forge.wu-wien.ac.at [rcpp-devel-boun...@r-forge.wu-wien.ac.at] on behalf of Dirk Eddelbuettel [e...@debian.org] Sent: 18 August 2011 14:39 To: x...@unm.edu Cc: rcpp-de...@r-forge.wu-wien.ac.at Subject: Re: [Rcpp-dev

Re: [Rcpp-devel] R.e. Speed gain assistance (Wray, Christopher)

2011-08-18 Thread Wray, Christopher
regardless! :-) ta, chris. From: icos.atr...@gmail.com [icos.atr...@gmail.com] on behalf of Christian Gunning [x...@unm.edu] Sent: 18 August 2011 09:14 To: rcpp-de...@r-forge.wu-wien.ac.at Cc: Wray, Christopher Subject: R.e. Speed gain assistance (Wray, Christopher) T

[Rcpp-devel] Speed gain assistance

2011-08-16 Thread Wray, Christopher
Hi list - although not strictly (or not really at all..) an Rcpp problem - I thought that since there are so many 'better-than-I' c++ coders here - whom are familiar with R... it might be a good place to ask. I have a "naive" piece of code - that in essence replicates what the R function "sampl

Re: [Rcpp-devel] Bug report: need to wrap return of sugar functions

2011-08-15 Thread Wray, Christopher
= x=matrix(1:12,4,3); print(ifelse(x<5,x*x,x)) src2=' using namespace Rcpp; NumericMatrix x(x_); NumericVector y=ifelse(x<5,x*x,x); y.attr("dim")=Dimension(x.nrow(),x.ncol()); return y; ' fun=cxxfunction(signature(x_ ="integer"),src2,plugin="Rcpp") print(fun(x)) === does

Re: [Rcpp-devel] fun(Times) with STL

2011-06-04 Thread Wray, Christopher
try: int min_el_ind = std::min_element(TimeQ.begin(), TimeQ.end()) - TimeQ.begin(); From: rcpp-devel-boun...@r-forge.wu-wien.ac.at [rcpp-devel-boun...@r-forge.wu-wien.ac.at] on behalf of Silkworth,David J. [silkw...@airproducts.com] Sent: 04 June 2011 18:

Re: [Rcpp-devel] [R] Help with integrating R and c/c++

2011-02-06 Thread Wray, Christopher
As Dirk says, using "inline" makes it real simple to start and to prototype code. You mention you have R functions you wish to "call" via Rcpp. Im not certain I fully understand what you require here, but it is pretty simple to pass R-side functions to C++ via Rcpp, and similarly its simple to

Re: [Rcpp-devel] Sugar/inline and RTools

2010-12-13 Thread Wray, Christopher
orge.r-project.org] on behalf of Romain Francois [rom...@r-enthusiasts.com] Sent: 13 December 2010 10:07 To: rcpp-devel@lists.r-forge.r-project.org Subject: Re: [Rcpp-devel] Sugar/inline and RTools Hello, Le 12/12/10 16:28, Dirk Eddelbuettel a écrit : > > Hi Chris, > > On 12 December

[Rcpp-devel] Sugar/inline and RTools

2010-12-12 Thread Wray, Christopher
Hi, Im using windows7, R2.12, Rtools2.12 and all the latest packages of inline, rcpp, etc. Over the last few weeks I have managed to get loads of the examples working, and all makes sense and is pretty clear. I had a couple of questions/comments: 1. RTools: On windows, I understand that Rcpp an