I am trying to compile the example program with "inline" from the
jstatsoft article by Eddelbuettel and Francois (2011). I am using
WinXP and R 2.13.2 and RCPP 0.9.7. I am using Rtools 2.14.
My code:
src <- '
Rcpp::NumericVector xa(a);
Rcpp::NumericVector xb(b);
int n_xa = xa.size(), n_xb =
Hello David,
Yes, Whit's example is great.
>From my own short experience, I would advise to stick to Whit's example
closely. For instance, try not to separate a class between e.g. .h and .cpp,
as inline seems to sometimes throw in an extra include for the user class,
but without the right path. (
Hello again,
"And had you posted reproducible examples we could have told you that days
ago."
That it is true. But I think I learned more about Rcpp this way.
Also, I definitely learned more about how inline works than had I followed
more instructions.
Moreover, having seen the sheer amount of st
Thanks Whit,
Actually, it had been my fault not to notice your elegant use of inline.
But this is good. It helps to prototype inline, before converting to package.
The debug and edit cycle is much faster using inline.
Dave
-Original Message-
From: Whit Armstrong [mailto:armstrong.w...@g
if you want it to be inline, then simply copy the contents of the .hpp
and .cpp files into your R script and quote them.
what the getModel function does is simply read the file into a string.
I do it this way because emacs knows how to properly indent the file
if I keep it separate (rather than a
Hi,
On Wed, Oct 12, 2011 at 11:50 AM, Silkworth,David J.
wrote:
> I see, but this is not truly an inline example is it?
Sorry -- I'm not sure what it is you're after, then. The run.cppbugs.r
file sure looks like it's using inline to me ... and in a "complex
fashion" at that, since you have sour
I see, but this is not truly an inline example is it?
https://github.com/armstrtw/CppBugs/tree/master/test/r.inline.example
Does that elucidate the things that need elucidating for you?
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cance
On 12 October 2011 at 11:00, Silkworth,David J. wrote:
| I have been observing Simon Fuller?s exploration here with interest, but not
so
| fully that I could replicate what he is now capable of doing. I wonder if
| someone could build a small test case that would show how this works, since I
| t
Hi,
On Wed, Oct 12, 2011 at 11:00 AM, Silkworth,David J.
wrote:
> I have been observing Simon Fuller’s exploration here with interest, but not
> so fully that I could replicate what he is now capable of doing. I wonder
> if someone could build a small test case that would show how this works,
>
I have been observing Simon Fuller's exploration here with interest, but
not so fully that I could replicate what he is now capable of doing. I
wonder if someone could build a small test case that would show how this
works, since I think this would be of interest to many.
_
On 12 October 2011 at 14:51, Simon Fuller wrote:
| Hello,
|
| We cross-posted. Yes, you're right. I misunderstood the use of includes -
And had you posted reproducible examples we could have told you that days
ago.
Have a look at the recent post by Whit Armstrong about his updated CppBugs
examp
Hello,
We cross-posted. Yes, you're right. I misunderstood the use of includes -
global - that is a good way of thinking about it.
Thanks for everything.
Simon
On Wed, Oct 12, 2011 at 2:06 PM, Darren Cook wrote:
> > pertain to packages. So I will post the relevant code here, and the full
> >
> pertain to packages. So I will post the relevant code here, and the full
> output from verbose=TRUE below it:
I think the verbose output was missing from your email (?).
> linktest<-cxxfunction( signature( vec = "numeric", len = "integer" ), paste(
> readLines(
> "/home/simon/College/PackageOne
Hello again,
I think I figured it out. I was messing up user includes by not using
readLines. I then had the further epiphany that I could just c() include the
cpp file as well there, because it is really just copying and pasting the
text, so it can copy and paste any text you throw at it.
Great
Hello Darren,
Thank you for your advice. It makes good sense.
I now have a linker problem, and I have written some code to abstract the
problem for your viewing.
The error message is:
"Error in dyn.load(libLFile) :
unable to load shared object '/tmp/RtmpBFr1mw/file44b636b6.so':
/tmp/RtmpBFr1
15 matches
Mail list logo