[ESS] Introducing Polymode

Vitalie Spinu spinuvit at gmail.com
Thu Mar 28 15:18:50 CET 2013


Sorry Rodney, inline is not supported as yet. With cppFunction it was
easy because the C source is the first argument. cxxfunction is a
somewhat more difficult case.

    Vitalie

  >> Rodney Sparapani <rsparapa at mcw.edu>
  >> on Thu, 28 Mar 2013 09:04:02 -0500 wrote:

  > On 03/27/2013 04:43 PM, Vitalie Spinu wrote:
  >> >  * when moving into a R chunk, I see:
  >> 
  >> >  polymode error: Args out of range: "hite", 4, 6 [5 times]
  >> 
  >> This one should be fine now.
  >> 
  >> Thanks,
  >> Vitalie

  > Yes!!  This fixes R help for me.  But, I still see
  > string literals in fontlock-test/runif.Rcxx with poly-r+c++-mode...

  > require(inline)
  > require(RcppEigen)

  > runifXd <- cxxfunction(signature(arg1="integer"), plugin='RcppEigen',
  >                        includes='
  > RNGScope scope;
  > using namespace Eigen;

  > inline VectorXd runifXd(int size, double a=0., double b=1.) {
  >   return as<VectorXd>(runif(size, a, b));
  > }',
  >                        body='return wrap(runifXd(as<int>(arg1)));')



  > runifXd(3)

  > i.e., includes= and body= are formatted as a string rather than C++.
  > Am I doing something wrong?  Thanks



More information about the ESS-help mailing list