Re: [Rcpp-devel] Returning a matrix from RcppEigen

2014-06-27 Thread Michael Hannon
er logging an issue at > https://github.com/RcppCore/RcppEigen so that we might tackle it later. > > Cheers, > Kevin > > > On Fri, Jun 27, 2014 at 11:31 AM, Michael Hannon > wrote: >> >> Thanks, Dirk. Last night I woke up with a cramp in my leg and the >> i

Re: [Rcpp-devel] Returning a matrix from RcppEigen

2014-06-27 Thread Michael Hannon
gen stuff worked just fine. Sorry for the noise. -- Mike On Fri, Jun 27, 2014 at 2:38 AM, Dirk Eddelbuettel wrote: > > On 26 June 2014 at 16:01, Michael Hannon wrote: > | Greetings. I've been trying to get familiar with RcppArmadillo and > RcppEigen. > | As my "Hello, worl

[Rcpp-devel] Returning a matrix from RcppEigen

2014-06-26 Thread Michael Hannon
Greetings. I've been trying to get familiar with RcppArmadillo and RcppEigen. As my "Hello, world!" example I'm using matrix multiplication. I got the Armadillo version to work, but I'm having trouble with the Eigen version. I'm trying to mimic one of Dirk's gallery snippets: http://gallery

Re: [Rcpp-devel] Unit Test Question Was: pnorm/qnorm?

2012-09-13 Thread Michael Hannon
Dirk Eddelbuettel wrote: >On 13 September 2012 at 09:48, Tim Triche, Jr. wrote: >| Likewise, are there ever good reasons to use '<<-' or could that stand to >| be retired too? > > Different discussion -- this is about the merits (or lack thereof) of global > variables. > > > We are getting rather

Re: [Rcpp-devel] Where is R.h and the other header files?

2012-08-26 Thread Michael Hannon
> I'm trying to write C++ code and call it in R. But after installing the Rcpp > package in R, I cannot find where the R.h and the other header file are. > When writing code in eclipse, it's really annoying to deal with the errors > because of the non-existance of R.h's. Is it a built-in feature of

Re: [Rcpp-devel] Running RcppArmadillo on Mac OS X 10.7

2012-06-13 Thread Michael Hannon
Chris Jefferson wrote: > I have been successfully using Rcpp for a while, and recently started > trying to use RcppArmadillo. I found it worked fine on linux, but on > Mac OS X 10.7, it fails. > . . . > The udnerlying error seems to be that I do not have 'libgfortran'. > This is indeed true, as f

Re: [Rcpp-devel] Problem with RInside "hello world" example

2012-05-22 Thread Michael Hannon
Dirk Eddelbuettel wrote: > On 22 May 2012 at 01:04, Michael Hannon wrote: >| Darren Cook wrote: >| >| >> 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

Re: [Rcpp-devel] Problem with RInside "hello world" example

2012-05-22 Thread Michael Hannon
Darren Cook wrote: >> 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) > > You are not telling g++ where to

[Rcpp-devel] Problem with RInside "hello world" example

2012-05-22 Thread Michael Hannon
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 ma

Re: [Rcpp-devel] Eigen vs Arma -- was: Re: Ceres nonlinear least squares solver

2012-05-06 Thread Michael Hannon
Steve Lianoglou wrote: >On Sat, May 5, 2012 at 1:21 PM, Dirk Eddelbuettel wrote: >[snip] >> At the end of day, and to me as a non-user of OS X, this just seems to make >> working on OS X as tedious as working on Windows where you have to patch >> your >> system together in bits and bobs.  I gues

Re: [Rcpp-devel] [OT] Rcpp CRAN usage milestone

2012-04-12 Thread Michael Hannon
On Sunday, April 8, 2012 at 10:50 AM Dirk Eddelbuettel wrote: > The CRANberries service [1] just noticed a new package 'survSNP' which > brings the number of CRAN packages having a Depends: or Imports: on Rcpp to > sixty. . . . > So I it is really nice to see that Rcpp appears to now be playing >

Re: [Rcpp-devel] (OS X / 64 bit woes?) R CMD check failing on skeletonc Rcpp module

2012-03-24 Thread Michael Hannon
On Saturday, March 24, 2012 10:46 AM, Dirk Eddelbuettel wrote: > On 23 March 2012 at 13:53, Michael Hannon wrote: >| I don't know if this is relevant, but locally we had occasion to install the >| g++ compiler for MacOS from fink: >| >| http://www.finkproject.org/ >| &g

Re: [Rcpp-devel] (OS X / 64 bit woes?) R CMD check failing on skeletonc Rcpp module

2012-03-23 Thread Michael Hannon
> From: Dirk Eddelbuettel . . . > I do not have an OS X machine, so I can't test this and do anything further, > I am afraid. > Try submitting it to win-builder.r-project.org which would throw another 64 > bit compiler in the mix.  We have had our share of issue with the older / > deprecated

Re: [Rcpp-devel] R random numbers vs c++

2012-03-22 Thread Michael Hannon
>Is there a reason to prefer Rcpp::runif over the c++ rand() for, say, >accepting a state in a Markov chain simulation? Is one more random than >another? faster? FWIW, the random-number stuff in C++11 appears to be greatly expanded:     http://en.wikipedia.org/wiki/C%2B%2B11#Extensible_random_num

Re: [Rcpp-devel] Limit of 20 on length of Rcpp::List::create?

2011-11-02 Thread Michael Hannon
> From: Douglas Bates > On Tue, Nov 1, 2011 at 3:32 PM, Michael Hannon wrote: >> >> >> Greetings.  It appears that there is a limit of 20 items in a list created >> by; >> >> Rcpp::List:create >>  [...] > Or go into Rcpp/inst/include/Rcp

[Rcpp-devel] Limit of 20 on length of Rcpp::List::create?

2011-11-01 Thread Michael Hannon
Greetings.  It appears that there is a limit of 20 items in a list created by;     Rcpp::List:create I.e., the appended code works as expected if I omit all references to "x21", but fails with an error (shown below, after the code example) when I include "x21".  (The successful output shown bel

Re: [Rcpp-devel] Problem with push_back to a list

2011-10-25 Thread Michael Hannon
[...] > You were very, very close to this existing example from the unit test file > runit.Vector.R (which, as Lists are GenericVector objects, also contains > lists): >  >                   ,"list_push_back"=list( >                   signature(x = "list"), >                   'List list(x) ; >  

[Rcpp-devel] Problem with push_back to a list

2011-10-25 Thread Michael Hannon
Greetings.  I need to return a list of initially-indeterminate length from C++.  I found the following note from Romain:     http://article.gmane.org/gmane.comp.lang.r.rcpp/69/match=push%5fback+list that seemed to solve the problem. I made what I thought were some minor tweaks to the example (us

Re: [Rcpp-devel] Picking off a matrix-valued list element inside a class constructor?

2011-10-24 Thread Michael Hannon
>> the seemingly equivalent statement in the body of a class constructor fails >> with a compilation error: >>  >>   includes = ' >>   class CCC{ >>   public: >>     CCC(Rcpp::List l){ >>       m = l["m"]; >>     } >>   [...] >>   private: >>     Rcpp::IntegerMatrix m; >>   } >>   ' > Here you are

Re: [Rcpp-devel] Picking off a matrix-valued list element inside a class constructor?

2011-10-24 Thread Michael Hannon
Thanks, Darren.  That worked well. -- Mike > >From: Darren Cook >To: rcpp-de...@r-forge.wu-wien.ac.at >Sent: Sunday, October 23, 2011 1:20 AM >Subject: Re: [Rcpp-devel] Picking off a matrix-valued list element inside a >class constructor? > >>        Rcpp::Int

[Rcpp-devel] Picking off a matrix-valued list element inside a class constructor?

2011-10-22 Thread Michael Hannon
Greetings.  I'm trying to pick off, in C++, one component, which is a matrix, from an R list. In the first appended example, starting with:     ** A list containing a matrix I pass a list from R to C++ and pick it off with a simple assignment statement:     ccode = '         Rcpp::List l(l_R);

Re: [Rcpp-devel] Misunderstanding about sugar

2011-10-20 Thread Michael Hannon
. . . > You also nmeed to disentangle the assignment as there is too much template > magic.  So this just worked for me: >  >  > R> library(Rcpp) > R> library(inline) > R>  > R> xorig <- c(1, -2, 3, -4, 5, -6, 7) > R>  > R> code <- ' > +    NumericVector x(xs); > +    NumericVector xa = sapply( x,

[Rcpp-devel] Misunderstanding about sugar

2011-10-20 Thread Michael Hannon
Greetings.  I'm trying to bootstrap my way into Rcpp.  I have the impression that the "Sugar" extension to Rcpp allows one to use R syntax to run a substantial subset of Rcommands within C++ (i.e., using native C++ code, not calling back to R).  If that's the case, I evidently have a gaping hole in