<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.r.rcpp">
    <title>gmane.comp.lang.r.rcpp</title>
    <link>http://blog.gmane.org/gmane.comp.lang.r.rcpp</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3476"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3475"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3474"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3473"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3472"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3471"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3470"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3469"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3468"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3467"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3466"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3465"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3464"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3463"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3462"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3461"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3460"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3459"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3458"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3457"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3476">
    <title>Rcpp modules documentation</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3476</link>
    <description>&lt;pre&gt;
There had been a number of posts over the last few weeks (months?) where
folks were struggling with getting Rcpp modules going based on the examples
in the vignette.  

I just spent a few hours cleaning things up.  The gist of it is

  -- this always worked, but I often forgot to point out that loading
     a module is different when you use inline to compile/load on the fly,
     and when you use a package;

  -- both uses were in fact documented in the vignette;

  -- both uses were in fact used in the unit tests too;

but it was a little hard to get to.  Now with the cleanup:: 

  -- the unit test for Rcpp modules actually had three different modules which
     I commented a bit more, and also moved to the package created by

        Rcpp.package.skeleton("somePackageName, module=TRUE)

     to provide more direct examples

  -- I moved some things from the 'evaluate but do not show' mode of Sweave
     into full view, so the vignette should be a tad more helpful as well.


So in short, "on the fly" and via inline's cxxfunction, one can do 

     inc &amp;lt;- '
     using namespace Rcpp;
     
     double norm( double x, double y ) {
         return sqrt( x*x + y*y );
     }
     
     RCPP_MODULE(mod) {
         function( "norm", &amp;amp;norm );
     }
     '
     library(inline)
     fx &amp;lt;- cxxfunction(, plugin="Rcpp", include=inc)
     
     mod &amp;lt;- Module( "mod", getDynLib(fx) )
     mod$norm( 3, 4 )

     
where the key is to pass the object created by cxxfunction() to Module() via
the getDynLib() function.  Free functions such as 'norm' are then accessible
as member functions of the object created by Module().

In a package, things are different.  We now declare the modules we want in
DESCRIPTION, and these can be loaded for us on startup -- the
skeleton-generated package shows how.  Free functions (such as norm above)
appear directly in the namespace of the package -- so it would be norm(3,4).

For "normal" use of Rcpp modules where classes are created we have

  -- via cxxfunction the following three-step:

        mod_vec &amp;lt;- Module( "mod_vec", getDynLib(fx_vec), mustStart = TRUE )
        vec &amp;lt;- mod_vec$vec
        v &amp;lt;- new( vec )

     which a) instantiated the module via Module(), b) gets the class from
     the modules and c) call the constructor via new()

  -- via a properly-created package it is just 

        v &amp;lt;- new( vec )

     as module is instantiated at package load.

All this is in SVN on R-Forge; the Rcpp package revision is now 0.9.10.5.

And with this we should be reasonably close to a 0.9.11 release.  There is a
bit more which John Chambers contributed not so long ago --- and which is
quite exciting as it builds on this and permits extending C++ classes on fly
from the R side with new member functions --- which I should document for
both a new release and the upcoming Rcpp tutorial at useR.

Hope this helps,  Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-24T19:44:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3475">
    <title>Re: Another rcpp package for examples</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3475</link>
    <description>&lt;pre&gt;
On 24 May 2012 at 15:58, Peter deVoil wrote:
| &amp;gt; | particular nastiness involved on windows platforms as the model is
| &amp;gt; | built with MSVC, yet calls GCC code (ie Rcpp) via extern "C".
| &amp;gt;
| &amp;gt; This comes up every now and then, and folks would surely love to see a good
| &amp;gt; tutorial and walk-through.
| 
| I'll have a go at it. Don't know how I'll go with the "good" part though.

Great.
 
| I used the windows dlsym() equivalent to call in to a handful of entry
| points. Given that this forces you to use C datatypes, you get none of
| the C++ operators that make Rcpp so useful - but in my case, the data
| exchange is fairly coarse and predictable.

Oh, so it is 

  a) really limited to atomistic C types just like the old .C() interface

  b) also highly non-portable as it will work only on that one platform.

Still, some people will want to try it regardless so it would be nice to have
some more documentation.

Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-24T18:57:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3474">
    <title>Re: What is the best way of handling default arguments.</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3474</link>
    <description>&lt;pre&gt;
On 24 May 2012 at 12:34, Andrew Redd wrote:
| Rcpp List,
| 
| Is there a recommended way to handle default arguments for
| constructors?  I have a class that I have created and exposed through
| Rcpp Modules.   I now found that I need to expose a tuning parameter
| and need to modify my constructors.   The standard way would be to
| include just a default argument, but I didn't think that Rcpp could
| handle default arguments in constructors.    Am I wrong?  Any
| recommendations?

I think you are correct.  

So you may have to make do with just setting a default value in the existing
constructor's body, and offering an additional setter.

Rcpp modules are a sort-of half-way house between the full glory of C++ and
the more direct interactive nature of R. Not everything can be mapped that
way, and we point to class member functions by name only.

Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-24T18:53:02</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3473">
    <title>What is the best way of handling default arguments.</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3473</link>
    <description>&lt;pre&gt;Rcpp List,

Is there a recommended way to handle default arguments for
constructors?  I have a class that I have created and exposed through
Rcpp Modules.   I now found that I need to expose a tuning parameter
and need to modify my constructors.   The standard way would be to
include just a default argument, but I didn't think that Rcpp could
handle default arguments in constructors.    Am I wrong?  Any
recommendations?

Thanks,
Andrew
&lt;/pre&gt;</description>
    <dc:creator>Andrew Redd</dc:creator>
    <dc:date>2012-05-24T18:34:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3472">
    <title>Re: Another rcpp package for examples</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3472</link>
    <description>&lt;pre&gt;
I'll have a go at it. Don't know how I'll go with the "good" part though.

I used the windows dlsym() equivalent to call in to a handful of entry
points. Given that this forces you to use C datatypes, you get none of
the C++ operators that make Rcpp so useful - but in my case, the data
exchange is fairly coarse and predictable.

Yours,
pdev
&lt;/pre&gt;</description>
    <dc:creator>Peter deVoil</dc:creator>
    <dc:date>2012-05-24T05:58:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3471">
    <title>Re: Another rcpp package for examples</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3471</link>
    <description>&lt;pre&gt;
Hi Peter,

Thanks for announcing this here.  Always nice to hear about use cases
involving Rcpp and RInside.

On 23 May 2012 at 16:09, Peter deVoil wrote:
| Folks,
| 
| May I thank the Rcpp community for providing such a useful package.
| 
| For your records, may I let you know that the farming systems model
| APSIM (www.apsim.info) is using Rcpp/RInside as a wrapper around the R
| language; allowing snippets of R code to interact with apsim
| simulations. http://www.apsim.info/Wiki/RComponent.ashx has a brief
| outline.
| 
| Source code is available from
| http://apsrunet.apsim.info/svn/apsim/trunk/Model/RLink/. There is
| particular nastiness involved on windows platforms as the model is
| built with MSVC, yet calls GCC code (ie Rcpp) via extern "C".

Thanks for pointing to the SVN views. 

There are a few pages on the site that are a bit more restrictive:

   http://www.apsim.info/Wiki/Downloads.ashx
   http://www.apsim.info/Wiki/Access-to-APSIM.ashx

and I am not too sure how/if you can really do that if you have components
(such as R, Rcpp, RInside, ...) licensed under GNU GPL.

What is your understanding there?

| particular nastiness involved on windows platforms as the model is
| built with MSVC, yet calls GCC code (ie Rcpp) via extern "C".

This comes up every now and then, and folks would surely love to see a good
tutorial and walk-through.  R Documentation such as "Writing R Extensions"
hints at it at times, but R Core generally declares this as "unsupported".
Which is the position Romain and I take as well as we generally work more on
Linux and OS X anyway.

Regards,  Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-23T12:36:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3470">
    <title>Re: Another rcpp package for examples</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3470</link>
    <description>&lt;pre&gt;"There is particular nastiness involved on windows platforms as the
model is built with MSVC, yet calls GCC code (ie Rcpp) via extern "C"."

I was not aware this particular nastiness was possible. At some point
I'll look at your code to see what it's doing. This particular nastiness
may actually simplify what I've got to do for the second part of our big
project.

Thanks,
Dale Smith, Ph.D.
Senior Financial Quantitative Analyst
Risk &amp;amp; Compliance
Fiserv.
107 Technology Park
Norcross, GA 30092
Office: 678-375-5315
Mobile: 678-982-6599
Mail: dale.smith-w4St3Zw4a6HQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org
www.fiserv.com

-----Original Message-----
From: rcpp-devel-bounces-ugOZBs531Z6LQD+cx0UyZNtNOq5v9fdn&amp;lt; at &amp;gt;public.gmane.org
[mailto:rcpp-devel-bounces-ugOZBs531Z6LQD+cx0UyZNtNOq5v9fdn&amp;lt; at &amp;gt;public.gmane.org] On Behalf Of Peter
deVoil
Sent: Wednesday, May 23, 2012 2:10 AM
To: rcpp-devel-ugOZBs531Z6LQD+cx0UyZNtNOq5v9fdn&amp;lt; at &amp;gt;public.gmane.org
Subject: [Rcpp-devel] Another rcpp package for examples

Folks,

May I thank the Rcpp community for providing such a useful package.

For your records, may I let you know that the farming systems model
APSIM (www.apsim.info) is using Rcpp/RInside as a wrapper around the R
language; allowing snippets of R code to interact with apsim
simulations. http://www.apsim.info/Wiki/RComponent.ashx has a brief
outline.

Source code is available from
http://apsrunet.apsim.info/svn/apsim/trunk/Model/RLink/. There is
particular nastiness involved on windows platforms as the model is built
with MSVC, yet calls GCC code (ie Rcpp) via extern "C".

Thanks again,
Yours,
PdeV
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel-Z+qqJ2/841dDXCDGMXqaGq2UG9VpUWMKQH7oEaQurus&amp;lt; at &amp;gt;public.gmane.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
&lt;/pre&gt;</description>
    <dc:creator>Smith, Dale</dc:creator>
    <dc:date>2012-05-23T11:44:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3469">
    <title>Another rcpp package for examples</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3469</link>
    <description>&lt;pre&gt;Folks,

May I thank the Rcpp community for providing such a useful package.

For your records, may I let you know that the farming systems model
APSIM (www.apsim.info) is using Rcpp/RInside as a wrapper around the R
language; allowing snippets of R code to interact with apsim
simulations. http://www.apsim.info/Wiki/RComponent.ashx has a brief
outline.

Source code is available from
http://apsrunet.apsim.info/svn/apsim/trunk/Model/RLink/. There is
particular nastiness involved on windows platforms as the model is
built with MSVC, yet calls GCC code (ie Rcpp) via extern "C".

Thanks again,
Yours,
PdeV
&lt;/pre&gt;</description>
    <dc:creator>Peter deVoil</dc:creator>
    <dc:date>2012-05-23T06:09:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3468">
    <title>Re: Problem with RInside "hello world" example</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3468</link>
    <description>&lt;pre&gt;
On 22 May 2012 at 12:51, Michael Hannon wrote:
| Dirk Eddelbuettel &amp;lt;edd-8fiUuRrzOP0dnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:
| 
| &amp;gt; On 22 May 2012 at 01:04, Michael Hannon wrote:
| &amp;gt;| Darren Cook &amp;lt;darren-BZBlJWF2IJvYtjvyW6yDsg&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:
| &amp;gt;|
| &amp;gt;| &amp;gt;&amp;gt; I've run into a problem with the RInside "hello world" &amp;gt; example.  I can
| &amp;gt;| &amp;gt;&amp;gt; not get it to compile on my system.  The first of the many error
| &amp;gt;| &amp;gt;&amp;gt; messages is:
| &amp;gt;| &amp;gt;&amp;gt;
| &amp;gt;| &amp;gt;&amp;gt;     undefined reference to `RInside::RInside(int, char const* const*,
| &amp;gt;bool)
| &amp;gt;| &amp;gt;
| &amp;gt;| &amp;gt; You are not telling g++ where to find the R libraries that you need to
| &amp;gt;| &amp;gt; link with.
| &amp;gt;
| &amp;gt;Correct -- the RInside package comes with four example directories.
| &amp;gt;
| &amp;gt;And each of these four directories has a Makefile.  The easiest to start with
| &amp;gt;is
| &amp;gt;
| &amp;gt;   examples/standard/Makefile
| &amp;gt;
| &amp;gt;as you can simply drop in a new file 'myhelloworld.cpp' (or any other name
| &amp;gt;you choose) into this directory and say 'make myhelloworld' --- and the
| &amp;gt;binary 'myhelloworld' will be created for you.
| &amp;gt;
| &amp;gt;It does this by querying R via Rscript to learn about
| &amp;gt;
| &amp;gt;   headers and libraries for R
| &amp;gt;
| &amp;gt;   headers and libraries for Rcpp
| &amp;gt;
| &amp;gt;   headers and libraries for RInside
| &amp;gt;
| &amp;gt;and all six components are needed for compiling and linking. 
|   
| Hmm.  Thanks, Dirk.  That Makefile is downright spooky smart (and worth a
| study in its own right). 

:-)  

"make" as a language actually won the same ACM Software Systems Awards that
John Chambers won for R (and which Smalltalk, Tcl/Tk, Netscape/The Web,
... won too).

I have learned a few tricks over the years, but that Makefile is pretty
standard (apart from the the 'list all .cpp and derive basenames from it).

| I was unaware of the "RHOME" option for R and the
| "shell" function in GNU make.  Given that I had only one *.cpp file in the
| directory, I got the binary to build simply by typing "make", but I did check
| that "make &amp;lt;filename&amp;gt;" also appears to work.

Yup. You need the latter to make the former (via implicit 'make all') work.

Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-22T20:11:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3467">
    <title>Re: Problem with RInside "hello world" example</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3467</link>
    <description>&lt;pre&gt;
  
Hmm.  Thanks, Dirk.  That Makefile is downright spooky smart (and worth a
study in its own right).  I was unaware of the "RHOME" option for R and the
"shell" function in GNU make.  Given that I had only one *.cpp file in the
directory, I got the binary to build simply by typing "make", but I did check
that "make &amp;lt;filename&amp;gt;" also appears to work.

&lt;/pre&gt;</description>
    <dc:creator>Michael Hannon</dc:creator>
    <dc:date>2012-05-22T19:51:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3466">
    <title>Re: Problem with RInside "hello world" example</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3466</link>
    <description>&lt;pre&gt;
On 22 May 2012 at 01:04, Michael Hannon wrote:
| Darren Cook &amp;lt;darren-BZBlJWF2IJvYtjvyW6yDsg&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:
| 
| &amp;gt;&amp;gt; I've run into a problem with the RInside "hello world" &amp;gt; example.  I can
| &amp;gt;&amp;gt; not get it to compile on my system.  The first of the many error
| &amp;gt;&amp;gt; messages is:
| &amp;gt;&amp;gt;
| &amp;gt;&amp;gt;     undefined reference to `RInside::RInside(int, char const* const*, bool)
| &amp;gt;
| &amp;gt; You are not telling g++ where to find the R libraries that you need to
| &amp;gt; link with.

Correct -- the RInside package comes with four example directories.

And each of these four directories has a Makefile.  The easiest to start with is

   examples/standard/Makefile

as you can simply drop in a new file 'myhelloworld.cpp' (or any other name
you choose) into this directory and say 'make myhelloworld' --- and the
binary 'myhelloworld' will be created for you.

It does this by querying R via Rscript to learn about 

   headers and libraries for R

   headers and libraries for Rcpp

   headers and libraries for RInside

and all six components are needed for compiling and linking.  

Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-22T10:19:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3465">
    <title>Re: Problem with RInside "hello world" example</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3465</link>
    <description>&lt;pre&gt;

Thanks, Darren.  I think that must be the issue.  I'll try adding the
additional include/library directories later today.

For the record, it occurred to me that I didn't include any R, Rcpp, or
RInside information in my original post.  I've appended it below.

&lt;/pre&gt;</description>
    <dc:creator>Michael Hannon</dc:creator>
    <dc:date>2012-05-22T08:04:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3464">
    <title>Re: Problem with RInside "hello world" example</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3464</link>
    <description>&lt;pre&gt;
You are not telling g++ where to find the R libraries that you need to
link with.

I've a similar basic RInside example and I've got a comment in the
header that says compile it with this:

g++ -I/usr/local/lib/R/site-library/Rcpp/include
-I/usr/local/lib/R/site-library/RInside/include -I/usr/share/R/include
-L/usr/lib64/R/lib -lR -L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp
-L/usr/local/lib/R/site-library/RInside/lib -lRInside
-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib -lRInside
-Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib main.cpp


You may have to adjust the paths (I'm on ubuntu 10.04, and I think
default locations for all R packages), but it gives you an idea of what
you're missing.

Darren

P.S. In that same directory I've also a rather long Makefile that
describes itself as a "simple Makefile". It doesn't look like I wrote
it; I guess it is from the RInside examples or vignette.




&lt;/pre&gt;</description>
    <dc:creator>Darren Cook</dc:creator>
    <dc:date>2012-05-22T07:40:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3463">
    <title>Problem with RInside "hello world" example</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3463</link>
    <description>&lt;pre&gt;Greetings.  I'm trying to go through some of the examples in the notes from
Dirk's Rcpp Masterclass of 28 April 2011.  (I didn't take the class.  I just
found the notes on the Internet.  Please let me know if my use of them
violates some law or protocol.  In case it makes any difference, I'm not
making any money from this project.)

I've run into a problem with the RInside "hello world" example.  I can not
get it to compile on my system.  The first of the many error messages is:

    undefined reference to `RInside::RInside(int, char const* const*, bool)

I've appended the details.  I get the same error if I omit the reference to
the c++0x standard.  What am I missing?

Thanks,

&lt;/pre&gt;</description>
    <dc:creator>Michael Hannon</dc:creator>
    <dc:date>2012-05-22T07:29:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3462">
    <title>ANN: RcppArmadillo 0.3.2.0</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3462</link>
    <description>&lt;pre&gt;
Conrad released a new stable version 3.2.0 of Armadillo which I wrapped into
RcppArmadillo 0.3.2.0. This version is now on CRAN.  

RcppArmadillo pre-releases do appear on R-Forge, and I did test the most
recent pre-release on a number of CRAN packages depending on RcppArmadillo to
ensure that everything still builds as usual.

The NEWS entries since 0.3.0.3 are below, summarizing the changes for the new
major release:

0.3.2.0  2012-05-21

    o   Upgraded to Armadillo release 3.2.0 "Creamfields"

      * faster eigen decomposition via "divide and conquer" algorithm
      * faster transpose of vectors and compound expressions
      * faster handling of diagonal views
      * faster handling of tiny fixed size vectors (≤ 4 elements)
      * added unique(), for finding unique elements of a matrix

0.3.1.94  2012-05-15

    o   Upgraded to Armadillo release 3.1.94 "v3.2 beta 2"

      * added unique(), for finding unique elements of a matrix
      * faster eigen decomposition via "divide and conquer" algorithm
      * faster transpose of vectors and compound expressions
      * faster handling of tiny fixed size vectors (≤ 4 elements)

0.3.1.92  2012-05-10

    o   Upgraded to Armadillo release 3.1.92 "v3.2 beta 2"

      * added unique(), for finding unique elements of a matrix
      * faster eigen decomposition via optional use of "divide and
        conquer" by eig_sym() 
      * faster transpose of vectors and compound expressions

Regards, Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-21T17:28:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3461">
    <title>Memory problem when compiling Rcpp/RcppEigen/lme4 withclang++</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3461</link>
    <description>&lt;pre&gt;I have been running into yet another memory problem in testing the
development version of lme4.  After doing the usual valgrind,
gctorture, gdb, etc. dance I found that the problem was originating in
the destructor of an Eigen object that included some cholmod
structures.  The problem was that the particular place where it was
failing is not a place where it should have gotten to.  (It should
only have called cholmod_free_factor and it was failing in
cholmod_free_dense.  Both of these are routines that are exposed
through the funky R_GetCCallable function in
RcppEigen/inst/include/RcppEigenStubs.h).  The problem went away when
I switched to g++.  For the time being I would recommend caution if
you choose to use clang++ to compile code linking to RcppEigen.
&lt;/pre&gt;</description>
    <dc:creator>Douglas Bates</dc:creator>
    <dc:date>2012-05-16T19:31:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3460">
    <title>Re: Rostream.h header</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3460</link>
    <description>&lt;pre&gt;
On 13 May 2012 at 18:04, Alexey Stukalov wrote:
| --- /usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rostream.h  2012-05-13
| 17:50:58.090987364 +0200
| +++ /fast/opt/lib64/R/library/Rcpp/include/Rcpp/iostream/Rostream.h    
| 2012-05-10 13:52:45.542940000 +0200
| &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,6 +24,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
|  
|  #include &amp;lt;iomanip&amp;gt;                             // USES setw
|  
| +#include "Rstreambuf.h"
| +
|  // modified from 
|  // http://stackoverflow.com/questions/243696/
| correctly-over-loading-a-stringbuf-to-replace-cout-in-a-matlab-mex-file
| 
| It would be nice if you can apply this tiny patch.

Done -- and it passes R CMD check just fine.

Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-13T16:47:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3459">
    <title>Re: Rostream.h header</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3459</link>
    <description>&lt;pre&gt;
On 13 May 2012 at 18:04, Alexey Stukalov wrote:
| Actually, the example above works just fine, since Rostream conforms to ostream
| concept.
| I just had to make the following change to Rostream.h to make it compile:
| 
| --- /usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rostream.h  2012-05-13
| 17:50:58.090987364 +0200
| +++ /fast/opt/lib64/R/library/Rcpp/include/Rcpp/iostream/Rostream.h    
| 2012-05-10 13:52:45.542940000 +0200
| &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,6 +24,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
|  
|  #include &amp;lt;iomanip&amp;gt;                             // USES setw
|  
| +#include "Rstreambuf.h"
| +
|  // modified from 
|  // http://stackoverflow.com/questions/243696/
| correctly-over-loading-a-stringbuf-to-replace-cout-in-a-matlab-mex-file
| 
| It would be nice if you can apply this tiny patch.

Sure -- will take a look at this.

Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-13T16:32:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3458">
    <title>Re: Rostream.h header</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3458</link>
    <description>&lt;pre&gt;

Actually, the example above works just fine, since Rostream conforms to
ostream concept.
I just had to make the following change to Rostream.h to make it compile:

--- /usr/lib64/R/library/Rcpp/include/Rcpp/iostream/Rostream.h  2012-05-13
17:50:58.090987364 +0200
+++ /fast/opt/lib64/R/library/Rcpp/include/Rcpp/iostream/Rostream.h
2012-05-10 13:52:45.542940000 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,6 +24,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;

 #include &amp;lt;iomanip&amp;gt;                             // USES setw

+#include "Rstreambuf.h"
+
 // modified from
 //
http://stackoverflow.com/questions/243696/correctly-over-loading-a-stringbuf-to-replace-cout-in-a-matlab-mex-file

It would be nice if you can apply this tiny patch.

Thanks,
   Alexey


_______________________________________________
Rcpp-devel mailing list
Rcpp-devel-Z+qqJ2/841dDXCDGMXqaGq2UG9VpUWMKQH7oEaQurus&amp;lt; at &amp;gt;public.gmane.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel&lt;/pre&gt;</description>
    <dc:creator>Alexey Stukalov</dc:creator>
    <dc:date>2012-05-13T16:04:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3457">
    <title>Re: Rostream.h header</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3457</link>
    <description>&lt;pre&gt;
Alexey,

The other thing you could do is to simply copy the logic of Rcpp::Rostream
over to something using boost::log.  All that really matters is that you end
up passing things to Rprintf().  

Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-13T15:59:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3456">
    <title>Re: Rostream.h header</title>
    <link>http://permalink.gmane.org/gmane.comp.lang.r.rcpp/3456</link>
    <description>&lt;pre&gt;
Hi Alexey,

On 13 May 2012 at 16:45, Alexey Stukalov wrote:
| thanks for the quick response, there are some clarifications below.
| 
| I'm trying to use Rcpp::Rostream from my C++ library, not from the inline code,
| so I have to deal with the headers inclusion on my own :)

Oh, now I see more clearly where you come from but I don't yet understand
where you want to go.

| Basically, I want to use Rostream as a log sink for boost::log (this library
| not in the mainline boost yet).
| Because of boost-log API I have to create new Rostream object, using
| Rcpp::Rcout is not an option.
| 
| The minimal code that directs log to R console once the library is loaded looks
| like this:
| 
| #include &amp;lt;Rcpp/iostream/Rostream.h&amp;gt;
| #include &amp;lt;boost/log/trivial.hpp&amp;gt;
| #include &amp;lt;boost/log/sinks.hpp&amp;gt;
| #include &amp;lt;boost/log/core.hpp&amp;gt;
| 
| // Called when the library is loaded and before dlopen() returns
| void __attribute__ ((constructor)) test_load()
| {
|     // initialize boost-log
|     // Construct the R sink
|     typedef boost::log::sinks::synchronous_sink
| &amp;lt;boost::log::sinks::text_ostream_backend&amp;gt; text_sink;
|     boost::shared_ptr&amp;lt; text_sink &amp;gt; pRSink = boost::make_shared&amp;lt; text_sink &amp;gt;
| ();
| 
|     // Add a stream to write log to
|     pRSink-&amp;gt;locked_backend()-&amp;gt;add_stream( boost::make_shared&amp;lt;Rcpp::Rostream&amp;gt;
| () );
| 
|     // Register the sink in the logging core
|     boost::log::core::get()-&amp;gt;add_sink(pRSink);
| 
|     BOOST_LOG_TRIVIAL(info) &amp;lt;&amp;lt; "R test library loaded";
| }
| 
| // Called when the library is unloaded and before dlclose() returns
| void __attribute__ ((destructor)) test_unload()
| {
| }
| 
| To make this code work I had to add #include "Rstreambuf.h" into &amp;lt;Rostream.h&amp;gt;
| for the reasons described above.
| I hope now it's more clear.

And this is code that you call from R?

This is basically outside of our current scope.  Rcpp doesn't use Boost
itself, so we can't promise that it works with boost::log etc -- this is
essentially something you need to work out.

That said, it could be made to work.  If you can suggest patches for our
header files that will help you without affecting prior behaviour, we could
possibly include.  Rcpp::Rostream is a good example as Jelmer added this
without affecting anything else.

Does that make sense?

Dirk

&lt;/pre&gt;</description>
    <dc:creator>Dirk Eddelbuettel</dc:creator>
    <dc:date>2012-05-13T15:42:57</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.r.rcpp">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.r.rcpp</link>
  </textinput>
</rdf:RDF>

