[Rcpp-devel] Building/linking trouble with cxxfunction()

Ken.Williams at thomsonreuters.com Ken.Williams at thomsonreuters.com
Tue Feb 22 17:53:13 CET 2011

On 2/19/11 9:20 AM, "Douglas Bates" <bates at stat.wisc.edu> wrote:

>On Fri, Feb 18, 2011 at 4:50 PM,  <Ken.Williams at thomsonreuters.com> wrote:
>> Hi Doug, did you ever get a test case working for this?
>I didn't try further.  I was hoping that you would pick up the sources
>for the package and experiment with it. :-)

Yes, a reasonable thing to hope for - I did pick it up and play with it
some that day, but I didn't get very far. I messed with it again now and
got farther, so now I'm getting correct output from it.  BTW, I changed
the prereq on Rcpp from 0.9.0 to 0.8.6 since that's the latest public

> I was using a value of 712 for the number of eigenvalue-eigenvector
> pairs to determine, which may have been a reason that it was taking so
> long, relative to the example you show below where only 3 pairs are
> determined.

Looks like that was probably the case.  Running my example matrix with
your wrapper gives me the results I expect, in a fraction of a second.

So now I'll modify your package to add return values for the eigenvectors,
as well as the eigenvalues you returned, so that it looks like the return
values from svd().

So it looks relatively straightforward (now) to package this up.  I'm
willing to do that, but would it be better to integrate this into the
Matrix package, or something like that, so that it "just works" for a
greater percentage of people?

I asked Doug Rohde if his licensing terms would allow redistribution, and
he said "SVDLIBC currently has an 'I don't care, use it for whatever'
license.  :-)"  But since it's based in turn on SVDPACKC, it would be good
to also contact its author, Michael Berry.

> In my opinion Tim's code is
> the state of the art in sparse matrix methods (except for the fact
> that it is primarily in C rather than expressed as classes in C++).

I may be missing it, but I don't see any SVD/eigenvector stuff in Tim's
code.  Is it an easy consequence of some other capability?

Ken Williams
Senior Research Scientist
Thomson Reuters
Phone: 651-848-7712
ken.williams at thomsonreuters.com

More information about the Rcpp-devel mailing list