Dirk Eddelbuettel Thinking inside the box
 
Fri, 05 Feb 2010

R / Finance 2010 Open for Registration
The annoucement below went out to R-SIG-Finance earlier today. For information is as usual the the R / Finance 2010 page:

Now open for registrations:

R / Finance 2010: Applied Finance with R
April 16 and 17, 2010
Chicago, IL, USA

The second annual R / Finance conference for applied finance using R, the premier free software system for statistical computation and graphics, will be held this spring in Chicago, IL, USA on Friday April 16 and Saturday April 17.

Building on the success of the inaugural R / Finance 2009 event, this two-day conference will cover topics as diverse as portfolio theory, time-series analysis, as well as advanced risk tools, high-performance computing, and econometrics. All will be discussed within the context of using R as a primary tool for financial risk management and trading.

Invited keynote presentations by Bernhard Pfaff, Ralph Vince, Mark Wildi and Achim Zeileis are complemented by over twenty talks (both full-length and 'lightning') selected from the submissions. Four optional tutorials are also offered on Friday April 16.

R / Finance 2010 is organized by a local group of R package authors and community contributors, and hosted by the International Center for Futures and Derivatives (ICFD) at the University of Illinois at Chicago.

Conference registration is now open. Special advanced registration pricing is available, as well as discounted pricing for academic and student registrations.

More details and registration information can be found at the website at
http://www.RinFinance.com

For the program committee:

Gib Bassett, Peter Carl, Dirk Eddelbuettel, John Miller,
Brian Peterson, Dale Rosenthal, Jeffrey Ryan

See you in Chicago in April!

/computers/R | permanent link

Wed, 03 Feb 2010

RProtoBuf 0.1-0
Romain uploaded our first release of RProtoBuf to CRAN yesterday. RProtoBuf provides bindings for GNU R to the Google Protobuf implementation. Google Protobuf is (and I quote) a way of encoding structured data in an efficient yet extensible format that is used for almost all internal RPC protocols and file formats at Google.

RProtoBuf had a funny start. I had blogged about the 12 hour passage from proof of concept to R-Forge project following the ORD session hackfest in October. What happened next was as good. Romain emailed within hours of the blog post and reminded me of a similar project that is part of Saptarshi Guha's RHIPE R/Hadoop implementation. So the three of us--Romain, Saptarshi and I---started emailing and before long it becomes clear that Romain is both rather intrigued by this (whereas Saptarshi has slightly different needs for the inner workings of his Hadoop bindings) and was able to devote some time to it. So the code kept growing and growing at a fairly rapid clip. Til that stopped as we switched to working feverishly on Rcpp to both support the needs of this project, and to implement ideas we had while working on this. That now lead to the point where Rcpp is maturing in terms of features, so we will probably have time come back to more work on RProtoBuf to take advantage of the nice templated autoconversions we now have in Rcpp. Oddly enough, the initial blog post seemed to anticipate changes in Rcpp.

Anyway -- RProtoBuf is finally here and it already does a fair amount of magic based of code reflection using the proto files. The Google documentation has a simple example of a 'person' entry in an 'addressbook' which, when translated to R, goes like this:

R> library( RProtoBuf )                      ## load the package
R> readProtoFiles( "addressbook.proto" )     ## acquire protobuf information
R> bob <- new( tutorial.Person,              ## create new object
+   email = "bob@example.com",
+   name = "Bob",
+   id = 123 )
R> writeLines( bob$toString() )              ## serialize to stdout
name: "Bob"
id: 123
email: "bob@example.com"

R> bob$email                                 ## access and/or override
[1] "bob@example.com"
R> bob$id <- 5
R> bob$id
[1] 5

R> serialize( bob, "person.pb" )             ## serialize to compact binary format

There is more information at the RProtoBuf page, and we already have a draft package vignette, a 'quick' overview vignette and a unit test summary vignette.

More changes should be forthcoming as Romain and I find time to code them up. Feedback is as always welcome.

/code/rprotobuf | permanent link

Sun, 31 Jan 2010

Rcpp 0.7.4
Yesterday, and about nine days after release 0.7.3 of Rcpp (a set of R / C++ interface classes), Romain and I released version 0.7.4. It has been uploaded to CRAN and Debian, and mirrors should already have new versions. As before, my local page is also available for downloads and some more details.

The release once again combines a number of necessary fixes with numerous new features:

  • Building on OS X did not support multi-arch, and we are grateful for Simon who once again came to the rescue. Things should be fine now. The big take-away is that under no circumstances, include either a file configure or src/Makefile if you want multi-arch builds for free. As Rcpp is effectively a library to be used by other packages, this mattered.
  • We added a file NEWS from which I include the relevant section below.
  • Much more code re-organisation and enhancement making passage of various C++ types even easier -- see the NEWS entry below.
  • More unit tests, now including ones for the 'old Rcpp API'.
Post-release, I also reworked the doxygen setup slightly so that all examples are now browseable, and the whole documentation is now searchable as well.

Lastly, we had a remaining Windows build issue. Also, Brian Ripley and Uwe Ligges kindly sent us a small patch supporting the new Windows 64-bit builds using the new MinGW 64-bit compiler for Windows -- so release 0.7.5 may follow in due course.

The NEWS file entry for release 0.7.4 is as follows:

0.7.4	2010-01-30

    o	matrix matrix-like indexing using operator() for all vector 
    	types : IntegerVector, NumericVector, RawVector, CharacterVector
    	LogicalVector, GenericVector and ExpressionVector. 

    o	new class Rcpp::Dimension to support creation of vectors with 
    	dimensions. All vector classes gain a constructor taking a 
    	Dimension reference.

    o	an intermediate template class "SimpleVector" has been added. All
    	simple vector classes are now generated from the SimpleVector 
    	template : IntegerVector, NumericVector, RawVector, CharacterVector
    	LogicalVector.

    o	an intermediate template class "SEXP_Vector" has been added to 
    	generate GenericVector and ExpressionVector.

    o	the clone template function was introduced to explicitely
    	clone an RObject by duplicating the SEXP it encapsulates.

    o	even smarter wrap programming using traits and template
        meta-programming using a private header to be include only
        RcppCommon.h

    o 	the as template is now smarter. The template now attempts to 
    	build an object of the requested template parameter T by using the
    	constructor for the type taking a SEXP. This allows third party code
    	to create a class Foo with a constructor Foo(SEXP) to have 
    	as for free.

    o	wrap becomes a template. For an object of type T, wrap uses
    	implicit conversion to SEXP to first convert the object to a SEXP
    	and then uses the wrap(SEXP) function. This allows third party 
    	code creating a class Bar with an operator SEXP() to have 
    	wrap for free.

    o	all specializations of wrap :  wrap, wrap< vector >
    	use coercion to deal with missing values (NA) appropriately.

    o	configure has been withdrawn. C++0x features can now be activated
    	by setting the RCPP_CXX0X environment variable to "yes".

    o	new template r_cast to facilitate conversion of one SEXP
    	type to another. This is mostly intended for internal use and 
    	is used on all vector classes

    o	Environment now takes advantage of the augmented smartness
    	of as and wrap templates. If as makes sense, one can 
    	directly extract a Foo from the environment. If wrap makes
    	sense then one can insert a Bar directly into the environment. 
    	Foo foo = env["x"] ;  /* as is used */
	Bar bar ;
	env["y"] = bar ;      /* wrap is used */    	

    o	Environment::assign becomes a template and also uses wrap to 
    	create a suitable SEXP

    o	Many more unit tests for the new features; also added unit tests
        for older API

As always, even fuller details are in the ChangeLog on the Rcpp page which also leads to the downloads, the browseable doxygen docs and zip files of doxygen output for the standard formats. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page

/code/rcpp | permanent link

Thu, 21 Jan 2010

Rcpp 0.7.3
A quick nine days after release 0.7.2 of Rcpp, our R / C++ interface classes, Romain and I are happy to roll out a new version 0.7.3. It has been uploaded to CRAN and Debian, and mirrors should have the new versions shortly. As before, my local page is also available for downloads and some more details.

This release combines a number of under-the-hood fixes and enhancements with one bug fix:

  • The Rcpp:::LdFlags() helper function to dynamically provide linker options for packages using Rcpp now defaults to static linking on OS X as well. For installation from source dynamic linking always worked, but not for binary installation (as e.g. from CRAN). As on the other platforms, this default can be overridden. Thanks to the phylobase team for patient help in tracking this down.
  • Accessing various types via [] should now be faster due to some enhancements in the internal representations.
  • configure now has a command-line option (as well as an environment variable) to select support for the draft of the upcoming C++0x standard.
  • A new function Rcpp.package.skeleton(), modelled after package.skeleton() in R itself, helps to set up a new package with support for using Rcpp.
  • A number of other minor tweaks and improvements...

As always, full details are in the ChangeLog on the Rcpp page which also leads to the downloads, the browseable doxygen docs and zip files of doxygen output for the standard formats. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page

/computers/linux/debian/packages | permanent link

Thu, 14 Jan 2010

RQuantLib 0.3.2 released
A new version of RQuantLib (a package combining the quantitative analytics of QuantLib with the R statistical computing environment and language) is now out at CRAN and in Debian (where it depends on the 1.0.0 beta of QuantLib that is currently in the NEW queue with its new library version). This RQuantLib release works with either the current release 0.9.9 as well as with the just-released first beta of QuantLib 1.0.0.

This versions brings a few cleanups due to minor Rcpp changes (in essence: we now define the macro R_NO_REMAP before including R's headers and this separate non-namespaced functions like error() or length() out into prefixed-versions Rf_error() and Rf_length() which is a good thing).

It also adds a number of calendaring and holiday utilities that Khanh just added: tests for weekend, holiday, endOfMonth as well dayCount, date advancement and year fraction functions commonly used in fixed income.

Full changelog details, examples and more details about this package are at my RQuantLib page.

/computers/linux/debian/packages | permanent link

Tue, 12 Jan 2010

Rcpp 0.7.2
Not even two weeks after the Rcpp 0.7.1 release, Romain and I have a new one to present: Rcpp 0.7.2. It has been uploaded to CRAN and Debian, and the respective package management systems should carry them around in the next few hours. As always, the local page is also available for download too.

A lot of the momentum for the new API is continuing, thanks in large part to Romain. A number of new classes have been added, and existing ones have been enhanced. There are more unit tests than ever, and more documentation. We have better build support (with g++ version detection so that we can add some C++0x support where available) and a new examples sub-directory.

We did take one toy away, though. The Doxygen-generated docs were getting so big that we decided to keep them out of the source tarball. (And arguably, they are also too volatile.) We still have the browseable html docs as well as the pdf version (now at over 300 pages!). And we added zip archives of the docs in html, latex, and man format for download.

As always, full details are in the ChangeLog on the Rcpp page. Questions, comments etc: bring them to the rcpp-devel mailing list off the R-Forge page

/computers/linux/debian/packages | permanent link

Thu, 07 Jan 2010

Review of 'Computational Statistics: An Introduction to R' in JSS
Somehow missed during the the end-of-year switchover was the fact that my review of Guenther Sawitzki's Computational Statistics: An Introduction to R (CRC / Chapman \& Hall, 2009) is now up on the Journal of Statistical Software website.

/computers/R | permanent link

Wed, 06 Jan 2010

RInside release 0.2.1
The shiny new 0.2.1 release of RInside, a set of convenience classes to facilitate embedding of R inside of C++ applications, just went out to CRAN; sources are also at my RInside page

This is a maintenance release building on the recent 0.2.0 release which added Windows support (provided you use the Rtools toolchain for Windows). In this release, we changed the startup initialization so that interactive() comes out FALSE (just as we had done for littler just yesterday) and with that no longer call Rf_KillAllDevices() from the destructor as we may not have had devices in the first place. A few minor things were tweaked around the code organisation and build process, see the ChangeLog for details.

The new release should hit CRAN mirrors tomorrow, and is (as always) available from my machine too.

/computers/linux/debian/packages | permanent link

Tue, 05 Jan 2010

littler 0.1.3
A new littler release (now at 0.1.3) just went out of the door this evening.

littler provides r (pronounced littler), a shebang / scripting / quick eval / pipelining front-end to the the R language and system.

This version adds a few minor behind-the-scenes improvements:

  • interactive() now evaluates to false as you'd expect in a non-interactive scripting front-end. To restore the previous behaviour, new switches -i or --interactive have been added.
  • Some of the 'cleanup' functionality described in Section 8.1.2 on 'Setting R callbacks' from the R Extension manual have been adopted.
  • Example scripts install.r and update.r received an update based on lessons learned from the R 2.10.0 roll-out and package rebuilding.
  • A few build issues were improved, a minor manual page formatting bug was fixed.

As usual, our code is available via our svn archive or from tarballs off my littler page and the local directory here. A fresh package is in Debian's incoming queue and will hit mirrors shortly.

/computers/linux/debian/packages | permanent link

Sat, 02 Jan 2010

Rcpp 0.7.1
Two weeks after the Rcpp 0.7.0 release, Romain and I are happy to announce release 0.7.1 of Rcpp. It is currently in the incoming section of CRAN and has been accepted into Debian. Mirrors will catch up over the next few days, in the meantime the local page is available for download too.

A lot has changed under the hood since 0.7.0, and this is the first release that really reflects many of Romain's additions. Some of the changes are

  • A new base class Rcpp::RObject that replaces RcppSexp (which is still provided for compatibility); it provides basic R object handling and other new classes derive from it.
  • Rcpp::RObject has real simple wrappers for object creation and a SEXP operator for transfer back to R that make simple interfaces even easier.
  • New classes Rcpp::Evaluator and Rcpp::Environment for expression evaluation and R environment access, respectively.
  • A new class Rcpp::XPtr for external pointer access and management.
  • Enhanced exception handling: exception can be trapped at the R even outside of try/catch blocks, see Romain's blog post for more.
  • Namespace support with the addition of a Rcpp namespace; we will be incremental in phasing this in keeping compatibility with the old interface
  • Unit test for most all of the above via use of the RUnit package, and several new examples.
  • Inline support has been removed and replaced with a Depends: on inline (>= 0.3.4) as our patch is now part of the current inline package as mentioned <here.
As before, fuller details are in the ChangeLog on the Rcpp page.

/computers/linux/debian/packages | permanent link

Mon, 28 Dec 2009

inline 0.3.4 released
Oleg has updated the inline package to version 0.3.4 which is now on CRAN. It is includes my patch for both Rcpp support as well as extended header / library options for PKG_CPPFLAGS, PKG_CXXFLAGS, and PKG_LIBS which I had mentioned recently here and here. There is also a brand-new and shiny R-Forge project for it.

A new release of Rcpp will probably follow in due course as we can now depend on this new inline version; Romain has also put nice new code in around exceptions and we may add some more on external pointers. Good times ...

/computers/linux/debian/packages | permanent link

Wed, 23 Dec 2009

Beancounter minor bug fix release 0.8.9
Another small update to beancounter and just like the previous release due to changes in Perl's Date::Manip. It seems that Date_Calc now really wants a reference to store error codes, so we supply one. I also changed the FX code to use OandA ad there are often issues with Yahoo's FX data. The version 0.8.9 is now in Debian, at CPAN and on my beancounter page here.

/computers/linux/debian/packages | permanent link

Tue, 22 Dec 2009

RInside release 0.2.0
RInside, a set of convenience classes to facilitate embedding of R inside of C++ applications, was updated to release 0.2.0 over the weekend. Sources as well as binary packages are at CRAN; sources are also at my RInside page

The biggest news is that we now support builds on Windows -- if and only if you use the R toolchain -- more on that below. Since I had first released RInside people had emailed about support on Windows. However, Richard Holbrey deserves special mention as he actually sat down and tried to build it. Over a few email exchanges we made decent progress, but stalled. More recently, I sat down and had another go and lo and behold, it works. This required a few #ifdef statements here and there, as well as a function setenv() which Windows does not have -- Richard kindly helped here and borrowed most of the code from R itself.

Now, to make this plain: you need gcc (as this is how R itself is built). This gcc compiler is the native compiler on Linux and OS X. But on Windows this requires installing the Rtools compiled by Duncan Murdoch as detailed in the The Windows Toolset appendix to the R Installation manual. Do not, I repeat, do not report an error if you fail to build this with another compiler as this is not supported.

That said, if you have the proper tools, things are peachy. Install the package, change into the examples directory installed with it and say make (or on Windows: make -f Makefile.win). That's it -- now run the examples (which on Windows will most likely require setting the environment variable R_HOME). Now you can run simple examples like the one from the previous blog post or any of the other ones.

Happy embedding!

/computers/linux/debian/packages | permanent link

Sun, 20 Dec 2009

Rcpp and inline example
Following up on yesterday's Rcpp 0.7.0 release, here is a quick example of why the new feastures can be so useful.

The following R code defines a character variable gslrng. This variable contains a short C++ code segment, which is then transformed by the function cfunction into a function of two arguments assigned to funx:

    ## now use Rcpp to pass down a parameter for the seed, and a vector size
    gslrng <- '
       int seed = RcppSexp(s).asInt();
       int len = RcppSexp(n).asInt();

       gsl_rng *r;
       gsl_rng_env_setup();
       std::vector<double> v(len);

       r = gsl_rng_alloc (gsl_rng_default);

       gsl_rng_set (r, (unsigned long) seed);
       for (int i=0; i<len; i++) {
           v[i] = gsl_rng_get (r);
       }
       gsl_rng_free(r);

       return RcppSexp(v).asSexp();
    '

    ## turn into a function that R can call
    ## compileargs redundant on Debian/Ubuntu as gsl headers are found anyway
    funx <- cfunction(signature(s="numeric", n="numeric"),
                      gslrng,
                      includes="#include <gsl/gsl_rng.h>",
                      Rcpp=TRUE,
                      cppargs="-I/usr/include",
                      libargs="-lgsl -lgslcblas")
    print(funx(0, 5))

The signature argument to cfunction defines two variables s and n -- which the C++ function then reads in from R and converts to two integers seed and len. seed is used to initialize the random-number generator, and len draws are then taken and stored in the STL vector v which returned at the end.

As the R level, we now have a function of two arguments returning a vector of RNG draws of the given lenth and using the given seed.

Also note how we tell cfunction to add the GSL include line, specify that we want to compile and link against Rcpp and provide -I and -L arguments to compile and link with the GSL. (The include statement is not needed as the compiler would have found them in /usr/include anyway, but it shows how to set this if needed.)

Finally, we simply call our freshly compiled, linked and loaded C++ function with arguments zero for the seed and five for the length, and print the results vector returned to R from C++.

/computers/linux/debian/packages | permanent link

Sat, 19 Dec 2009

Rcpp 0.7.0
A new release of Rcpp awaits inclusion on CRAN and has also been sent as a .deb to Debian. It will hit mirrors over the next few days, in the meantime you can get it here as well.

This release has a couple new features :

  • inline support: the cfunction from Oleg Sklyar's excellent inline package has been imported and adapted. This means simple C++ programs can be defined in an R character vector and passed to cfunction which will create a complete file that it then compiles, links and loads --- giving you access to compiled C++ code right from the R prompt without having to worry about compiler flags, linker options, ... Better still, we extended this to not only support Rcpp but any external library via addtional header / linker arguments that will be passed to R via the PKG_CPPFLAGS, PKG_CXXFLAGS and PKG_LIBS environment variables.
  • this even works on Windoze (if you have the Rtools installed as detailed in the Windows Toolset appendix to the R Installation manual) in exactly the same way. And no folks, that still does NOT mean you can use Visual Whatever -- R really requires MinGW as the links in this parapgraph document very plainly. But if and when you have the tools, R's remarkable consistency across operating systems allows you to use Rcpp and inline in pretty much the same way.
  • A handful of new examples for the inline support have been added.
  • A new type RcppSexp for simple int, double or std::string scalars as well as vectors; this is particularly useful for the inline support.
  • This also completes the source code reorginsation: every class now has its own header and implementation file
  • Last but not least, the package has been relicensed from LGPL-2.1 (or later) to GPL 2 (or later).
Fuller details are in the ChangeLog on Rcpp page.

/computers/linux/debian/packages | permanent link

Sun, 13 Dec 2009

RQuantLib 0.3.1 released
A new version of RQuantLib is now out at CRAN and in Debian. It updates the package to the 0.9.9 release of QuantLib and is mostly a maintenance release with a few minor fixes along the way.

Full changelog details, examples and more details about this package are at my RQuantLib page.

/computers/linux/debian/packages | permanent link

Sun, 06 Dec 2009

digest 0.4.2
digest version 0.4.2 is now on CRAN. This new version features a fix by Henrik Bengtsson who also joined the R-Forge-hosted digest project.

/computers/linux/debian/packages | permanent link

Tue, 01 Dec 2009

Updated slides for 'Introduction to HPC with R' (now with correct URLs)
This is an updated version of yesterday's post with corrected URLs -- by copy-and-pasting I had still referenced the previous slides from UseR! 2009 in Rennes instead of last Friday's slides from the ISM presentation in Tokyo. The presentations page had the correct URLs, and this has been corrected below for this re-post. My apologies!

As mentioned yesterday, I spent a few days last week in Japan as I had an opportunity to present the Introduction to High-Performance Computing with R tutorial at the Institute for Statistical Mathematics in Tachikawa near Tokyo thanks to an invitation by Junji Nakano.

An updated version of the presentations slides (with a few typos corrected) is now available as is a 2-up handout version. Compared to previous versions, and reflecting the fact that this was the 'all-day variant' of almost five hours of lectures, the following changes were made:

  • the 'parallel computing' section was expanded further with discussion of the recent R packages multicore, iterators, foreach, doNWS, doSNOW, doMPI;
  • a first discussion of GPU computing using the gputools package was added;
  • the section on 'out of memory computing' using ff, bigmemory and biglm (including an example borrowed from Jay Emerson) reappeared in this longer version;
  • minor fixes and polishing throughout.

Comments and suggestions are, as always, appreciated.

/computers/R | permanent link

Sun, 29 Nov 2009

Back from Tokyo
Just got back from Tokyo a few hours ago: I had an opportunity to give my 'Introduction to High-Performance Computing with R' tutorial / lectures (for which previous slides can be found here). This was an all-day talk at the Institute for Statistical Mathematics at their new site in Tachikawa in the greater Tokyo area, thanks to an invitation by Junji Nakano.

Lisa and I turned this into a brief one-week trip to Kyoto and Tokyo, and we had a truly wonderful time on what was our first visit to Japan. I should blog some more about it, but now I will give in to the jet lag and catch up on some sleep...

/misc | permanent link

Tue, 10 Nov 2009

Rcpp 0.6.8
As memtioned when I announced release 0.6.7 of Rcpp two days ago, a new version 0.6.8 was due because of my oversight of also adapting Makevars.win (used on that other OS) to the new file layout.

So 0.6.8 went onto CRAN and into Debian earlier in the day. Beside the aforementioned fix, I also split off a more class headers and implementations into their own files but changed no actual functionality.

As always, more details are at the Rcpp page.

/computers/linux/debian/packages | permanent link

Mon, 09 Nov 2009

R / Finance 2010 Call for Papers
Jeff sent the following while I had connectivity issues and I hadn't gotten around to posting it here.

So without further ado, and given the success of our initial R / Finance 2009 conference about R in Finance, here is the call for papers for next spring:

Call for Papers:

R/Finance 2010: Applied Finance with R
April 16 and 17, 2010
Chicago, IL, USA

The second annual R/Finance conference for applied finance using R will be held this spring in Chicago, IL, USA on April 16 and 17, 2010. The two-day conference will cover topics including portfolio management, time series analysis, advanced risk tools, high-performance computing, market microstructure and econometrics. All will be discussed within the context of using R as a primary tool for financial risk management and trading.

One-page abstracts or complete papers (in txt or pdf format) are invited for consideration. Academic and practitioner research proposals related to R are encouraged. We will accept submissions for full talks, abbreviated "lightning talks", and a limited number of pre-conference tutorial sessions. Please indicate with your submission if you would be willing to produce a formal paper (10-15 pages) for a peer-reviewed conference proceedings publication.

Presenters are strongly encouraged to provide working R code to accompany the presentation/paper. Data sets should also be made public for the purposes of reproducibility (though we realize this may be limited due to contracts with data vendors). Preference may be given to presenters who have released R packages.

Please send submissions to: committee at RinFinance.com

The submission deadline is December 31st, 2009.

Submissions will be evaluated and submitters notified via email on a rolling basis. Determination of whether a presentation will be a long presentation or a lightning talk will be made once the full list of presenters is known.

R/Finance 2009 included keynote presentations by Patrick Burns, Robert Grossman, David Kane, Roger Koenker, David Ruppert, Diethelm Wuertz, and Eric Zivot. Attendees included practitioners, academics, and government officials. We anticipate another exciting line-up for 2010 and will announce details at the conference website http://www.RinFinance.com as they become available.

For the program committee:

Gib Bassett, Peter Carl, Dirk Eddelbuettel, John Miller,
Brian Peterson, Dale Rosenthal, Jeffrey Ryan

See you in Chicago in April!

/computers/R | permanent link

Sun, 08 Nov 2009

Rcpp 0.6.7
Version 0.6.7 of the Rcpp package---a set of C++ classes making it easier to glue C/C++ code to R---is now on CRAN and Debian. This is a fairly incremental release that contains just a few small changes that arose since the previous release in August.

One change is that a new type RcppList was added which allows us to build R 'list' types in C++. In particular, this makes it possible to have data structures of different types and dimensions. We had not previously accomodated this as our data structures where more regularised (i.e. think matrices or vectors of various types). The need for this came out of the work with the recently started RProtoBuf package which interfaces the Google ProtoBuf library. The incredible Romain François has joined the project and added a number of nice tricks; this will need another blogpost sooner rather than later. In the meantime, check out the RProtoBuf pages at R-Forge.

Another small change was the addition of a self-contained example of a function callback from C++ into R which wasn't all that well documented before; this was in response to a user request.

Finally, I started RcppList as a first step in reorganising the code a little better and split the class header and body off into separate files. This required changes to the infrastrucure files Makevars, cleanup, ... and I promptly forgot the Makevars.win Windoze variant which will require a 0.6.8 release real soon.

/computers/linux/debian/packages | permanent link

Sat, 31 Oct 2009

Adventures with Comcast: Part ohnoesnotanotherone in an ongoing series
Regular readers of this blog (yes, both of you!) may remember the computer/broadband/ directory that this post appears in as the collection of my Comcastic (yeah right) experiences with my ISP.

But I think this week may top everything. I'll just try to jot down some notes before I forget all the gory details:

  • On Tuesday, I edited one of the internal nvram configuration variables of my trusted wrt54g router in order to add the older daughter's shiny new iPod Touch to the set of 'permitted' MAC addresses. This router, running a custom Linux variant called OpenWRT had essentially not been upgraded since I first installed it, and still required a quick reboots after updating of configuration values. However, that worked fairly flawelessly for 4 1/2 years. Until Tuesday.
  • Upon reboot, I got what appeared to be an invalid network setup from the cable modem. IP and Gateway assigned , but no DNS and no ability to ping anywhere. Crap. So I fiddled with this all evening, including a service call to Comcast but to no avail. When a laptop was directly plugged into the cable modem, it got correct settings albeit on a completely different subnet. So for the next day, we left one machine directly plugged so that my wife could at least telecommute.
  • Somehow it became apparent that waiting insanely long for the router to remain powered-down -- and we're talking five minutes or longer -- helped. So by now we were suspecting the cable modem. I use a standard Motorola SB5101 I once had to buy in a rush because of the Comcastic ones who all of a sudden changed their minimum requirements which meant they would no longer connect to my existing modem. Anyway. So on Wednesday I called Motorola and had a decent service call with them but as I was at work I couldn't follow up with part numbers etc pp. At least I learned that I seem to have two months of the two-year warranty left...
  • So by Wednesday evening I decided to fall back to the really cheap and old Speedstream router I had used before the Linksys wrt54g. That worked, albeit sloooooowly. Wired and wireless ethernet, direct assignment from the cable modem. All well. But did I mention it was sloooow though?
  • Thursday evening was skipped as I was at the Chicago R meeting we organize to complement our R / Finance conferences in the spring.
  • Given that the cable modem worked with the old Speedstream and with directly-connected machines, I decided to finally go for a long overdue update of the wrt54g software. So that happened on Friday, i.e. yesterday. And similar to my previous wrt54g notes, I needed to flash the new software with the tftp protocol and a helper script on a laptop connected to the router. All this took a while as I needed to remember to also send to a ping flood to the router to be able to catch the tftp request, needed to test which of the atftp and tftp binaries worked reliably, and whether the router prefers .bin images over .trx images when using the tftp protocol. But lo and behold this worked, and I configured a shiny new Kamikaze aka 8.09.1 version of OpenWRT. This even connected to the cable modem once I helped with DNS entries. OpenWRT generally rocks, and this new release is a lot nice than the more bare-bones version I used to run.
  • Unfortunately, I had picked the bcrm47xx variant -- the 2.6.* kernel version of the OpenWRT Project's software for my WRT device. And guess what, that one does not include wireless support due to issues with Broadcom drivers and the kernel. Grrr. So once I had that confirmed this morning, I quickly switched to the bcrm-2.4 variant of the same 8.09.1 release. At least now I can flash from within using the mtd command from the commandline.
  • But once up and running with the bcrm-2.4 release, I ran into the same issue we have had with the Motorola cable modem and Comcast behind them. Each time I connect with the wrt54g, I end up on a specific subnet, without DNS and with no ability to connect. The Speedstream still worked. So what to do? Well, MAC Cloning to the rescue. Now the Linksys wrt54g pretends to be the Speedstream, and all, at last, is well again.
  • So after four days of intermittent service, which means that my few web pages, blog, and goodies like CRANberries were invisible, I now have better router software. That could have come a little easier, and I still don't quite know why Comcast decides to no longer service the wrt54g under the MAC address it presented itself with for 4 1/2 years. I have paid thousands of dollars over that time to get broadband access. But this, I don't quite call service. To top it all off, guess who cold-called to sell VOIP service while I wrote this up? Oh, it's Comcastic ...

/computers/broadband | permanent link

Thu, 22 Oct 2009

From ORD Sessions to R-Forge in 12 hours with RProtoBuf
Yesterday, via in invitation from fellow Chicago-area Google Summer of Code mentor Borja Sotomayor, I attended the Second ORD Sessions. These are happening at the HQ of Inventable where a couple of technologists and Open Source geeks from the Chicagoland area get together and riff on code for a few hours after work over some pizza and beer.

Sounded good, and I needed an excuse to try to mix the awesome Protocol Buffers with my favourite data tool, R. What are Protocol Buffers? To quote from the Google overview page referenced above:

Protocol buffers are a flexible, efficient, automated mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages. You can even update your data structure without breaking deployed programs that are compiled against the "old" format.
and later on that page:
Protocol buffers are now Google's lingua franca for data – at time of writing, there are 48,162 different message types defined in the Google code tree across 12,183 .proto files. They're used both in RPC systems and for persistent storage of data in a variety of storage systems.

So three hours later, I had an implementation of the 'addressbook reader' C++ example wrapped in a tiny yet complete R package that passed R CMD check. And one lingua franca for data has met another.

So before going to bed, I quickly registered a new project at R-Forge, everybody's favourite R hosting site, and thanks to the tireless Stefan Theussl (and some favourable timezone differences) the project was approved and the stanza available by the time I got up. So I quickly filled the SVN repo and, presto, we had the RProtoBuf project at R-Forge within 12 hours of the ORD Sessions hackfest. I will try to follow up on RProtoBuf in a couple of days, this may lead to some changes in my Rcpp R / C++ interface package as well.

/computers/misc | permanent link

Mon, 19 Oct 2009

RPostgreSQL 0.1-6
A quick bug fix released of RPostgreSQL was uploaded to CRAN earlier today; it updates last week's 0.1-5 release. An editing error left one of the helper functions broken. I also updated a few of the test scripts to also allow for optional environment variable for the port at which the PostgreSQL server is listening. This is handy when you have parallel installations of different PostgreSQL versions which Debian makes really easy.

As always, all the details (including the full ChangeLog) are at the local RPostgreSQL page, the RPostgreSQL package page at CRAN and of course the Google Code repository for RPostgreSQL.

/computers/linux/debian/packages | permanent link

Fri, 16 Oct 2009

Dianne Reeves: Strings Attached at the CSO
Another trio concert at CSO, but very different from the most recent classic piano trio. Tonight was once again a chance to see Dianne Reeves (wikipedia) but this time accompanied simply by two guitarists: Russell Malone and Romero Lubambo (wikipedia).

Given that Dianne Reeves (who we had seen in just a few month earlier in our neighbourgood) has plenty of stage presence, the format made for a more intimate concert yet with plenty of groove at times too. The three had been touring in Europe for 25 shows, and it was a really nice performance and a great way to end the week. Recommend if you can catch them somewere.

/music/jazz/live | permanent link

Tue, 13 Oct 2009

RPostgreSQL 0.1-5
A new version of RPostgreSQL just went out to CRAN and should propagate via the mirrors over the next few days.

This is a maintenance and bug fix release that addresses four of the seven issue at the Google Code page. Two more are really enhancement requests for which we encourage patches as we are unlikely to have to write them, and the last issue I have been unable to replicate.

This release has benefitted greatly from the generous help of Neil Tiffin who now looks after all things OS X and keeps a good eye on the Google Code site (where I had, ahem. overlooked the existence of these open issue tickets for a few months), Joe Conway who we can count on for hard-core PostgreSQL issues as well as Jeff Horner for general R, DBI and database smarts.

Some more details (including the full ChangeLog) are at the local RPostgreSQL page, the RPostgreSQL package page at CRAN and of course the Google Code repository for RPostgreSQL.

/computers/linux/debian/packages | permanent link

Mon, 12 Oct 2009

Zut alors!
Christian: of course you will be running the Chicago 2010 marathon as your next fall marathon. Not only are Paris and Chicago jumelée (i.e. sister cities), but the Dollar is so conveniently falling vis-à-vis the Euro that you'd get all this done for about a Euro and a half by the time the race happens. Moreover, 2010 is going to be Debian's US year anyway. I crammed my two European races into two four day trips which I won't exactly recommend, but you do not need ten days either. Lastly, I cannot promise you many interesting cheeses but there are at least a few pretty tasty beers to sample. À bientôt à Chicago!

/sports/running | permanent link

Sun, 11 Oct 2009

Chicago Marathon 2009
Earlier today the 33rd Chicago Marathon was held. I will organise my comments by pointing out three epic fails.

First, of course, was the Chicago weather. After two successive marathon in excessive heat --- the 2007 race I completed, poorly, with its thousands of runners forced to abandon when the race was cancelled due to excessive heat, and the 2008 version which I skipped as I ran Berlin that year just weeks before Chicago, this year had forecasts of temperatures in the thirties and possibly snow the night before. Well, the weather cleared up -- but with those clear skies we still got a severe weather alert for the area due to frost! So at the (now earlier by 30 minutes) race start, it was very nippy and in the higher 30s, improving steadily under sunny skies. Overall, a little chilly and hence not exactly ideal, but not too bad in the grand scheme of things. A little windy coming up Michigan Avenue. But hey, Wanjiru still finished with a course record though still well off the world record. So maybe not a fail after all.

The second fail, though, was my GPS which I had just blogged about yesterday (albeit indirectly). I had had my issues with the previous (much simpler and older) Forerunner 205 which lost satellite tracking when running downtown amidst the skyscrapers. I had high hopes that this newer model would do better. But no, not only did it loose track within the first few miles, it even managed to outdo the older model by turning its GPS tracking off in the later stages. Now that's a fail!

The third and final fail, unfortunately, concerns my run. Training had gone well enough to let me hope for another decent race. However, a latent cold during the last two weeks had left me somewhat afraid I might not do well. Things felt better yesterday, and I ended up running a decent first eighteen miles to the waterstop the rest of my household was working. And thereafter: well let's just say that the wheels came off. I ended up with a 3:25:40 (or around 7:51 min/mile and 4:53 min/km) which is not terrible but also not one of my better races.

I updated the two race data geekery charts shown here before to illustrate the fail. As I am running out of shades of blue for Chicago, I show the 2009 race in purple. A decent, flat chat indicating a reasonably steady pace throughout most of the race ... followed by one of the very worst finished. And as discussed above, I cannot really blame the weather either.

(updated marathon pace comparison chart)

I also updated my 'performance by race type through time' chart which suggests that I may be getting slower for marathons (if we allow for a non-linear effect). Eek.

(pace by date given group lattice chart)

/sports/running | permanent link

Sat, 10 Oct 2009

R for system administration and scripting
On several occassions, R had suggested itself as a language for systems scripting. By this I mean random little adminstrative task such as (re-)moving or maybe renaming files or directories and the like.

One of such cases just happened a few minutes ago. The aforementioned Garmin Forerunner 405 can cooperate quite nicely with Linux using the gant reader for the ant wireless communication protocol between the usb hardware dongle and the Garmin 405. (Sources for gant are both this file and this git archive.) I had meant to blog about this tool and the resulting files one of these days anyway, but today I just want to mention that the default filenames created by the program were somewhat horrid such as 20.09.2009 101112.TCX to denote the 20th of September of this year at 10:11h and 12 seconds. As we all know, filenames with spaces are bad for the environment as well as plain annoying. So I had made the simple change in the C sources to switch to a saner format such as 20090920-101112.TCX (and I see that the git archive now contains a similar fix). But that still left me with some 80+ files with the dreaded names.

There are of course many ways to skin this cat and to rename the files in bulk. However, I found the following four lines to be fairly succinct

#!/usr/bin/r
files <- dir(".", pattern=".*\\.TCX$")
res <- lapply(files, function(f) {
    pt <- strptime(f, "%d.%m.%Y %H%M%S.TCX")  # parsed time
    ft <- strftime(pt, "%Y%m%d-%H%M%S.TCX")   # formatted time
    file.rename(f, ft)
})
as they show, among other things,
  • the access to one of the three (soon four) regexp engines, here as a simple patterns argument to dir()
  • the functional programming nature of the beast: files is a vector of filenames, and lapply() unrolls the vector one-by-one calling the anonymous function and passing the current element off as f
  • computing on times is particularly easy as we get strptime and strftime as any self- and POSIX-respecting language should
  • similarly, we get access to file system-level operations natively avoiding all quoting issues that make files with spaces such fun in the first place.
  • the littler scripting frontend providing /usr/bin/r rules.
So about five lines and two minutes later, some eighty-ish files were renamed and sanity was restored. Hm, and I took me five times as long to blog this.

Lastly, I do not mean to imply that Python or Perl or Ruby or (insert favourite tool here) cannot do it equally well. I simply meant to say that programmatically creating new filenames is definitely easier in R than it would have been in shell. And as an added bonus, we even get fully parsed time objects that I could have tested for. But then tests and documentation never get written on a Saturday.

/computers/R | permanent link

Tue, 29 Sep 2009

RInside release 0.1.1, and a fresh example
Last week's 0.1.0 release of RInside, and the first to have been published on CRAN, still had some issues with builds and use on OS X. Thanks to testing and fixes by Jan de Leeuw, Jeff Horner and particularly Simon Urbanked, things are said to be better now with the new release 0.1.1 which went onto CRAN yesterday. So no new features, but fixes to the main Makefile as well as the Makefile for the examples directory, some minor fixes and editing for the examples. I also added a file THANKS to show some appreciation for the various patches and fixes I have been receiving -- they are appreciated!

However, today I committed a new example to SVN archive at R-Forge. It is based on this thread on r-devel. Abhijit Bera tries to do this in C, but to me his questions provide rather clear motivation for showing how much simpler things can be via C++ and the Rcpp classes along with RInside. Using a small example, the task was to pass a weight vector to a portfolio solver from the Rmetrics package fPortfolio and to then access the computed solution. The original poster struggled with access from C to the S4 classes used by fPortfolio and could not set the weights. But when using RInside, we simply pass a C++ vector of weights down to R, solve the problem and pass a solution vector back using the handy evaluation of R expressions:

// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4;  tab-width: 8; -*-
//
// Another simple example inspired by an r-devel mail by Abhijit Bera
//
// Copyright (C) 2009 Dirk Eddelbuettel and GPL'ed

#include "RInside.h"                    // for the embedded R via RInside
#include "Rcpp.h"                       // for the R / Cpp interface used for transfer
#include <iomanip>

int main(int argc, char *argv[]) {

    try {
        RInside R(argc, argv);          // create an embedded R instance
        SEXP ans;

        std::string txt = "suppressMessages(library(fPortfolio))";
        if (R.parseEvalQ(txt))          // load library, no return value
            throw std::runtime_error("R cannot evaluate '" + txt + "'");

        txt = "lppData <- 100 * LPP2005.RET[, 1:6]; "
	  "ewSpec <- portfolioSpec(); "
	  "nAssets <- ncol(lppData); ";
        if (R.parseEval(txt, ans))      // prepare problem
            throw std::runtime_error("R cannot evaluate '" + txt + "'");

	const double dvec[6] = { 0.1, 0.1, 0.1, 0.1, 0.3, 0.3 }; // choose any weights you want
	const std::vector<double> w(dvec, &dvec[6]);

	R.assign( w, "weightsvec");	// assign STL vector to R's 'weightsvec' variable

	txt = "setWeights(ewSpec) <- weightsvec";
        if (R.parseEvalQ(txt))		// evaluate assignment
            throw std::runtime_error("R cannot evaluate '" + txt + "'");

	txt = "ewPortfolio <- feasiblePortfolio(data = lppData, spec = ewSpec, constraints = \"LongOnly\"); "
	  "print(ewPortfolio); "
	  "vec <- getCovRiskBudgets(ewPortfolio@portfolio)";
        if (R.parseEval(txt, ans))      // assign covRiskBudget weights to ans
            throw std::runtime_error("R cannot evaluate '" + txt + "'");
	RcppVector<double> V(ans);      // convert SEXP variable to an RcppMatrix

	R.parseEval("names(vec)", ans);	// assign columns names to ans
	RcppStringVector names(ans);

	for (int i=0; i<names.size(); i++) {
	  std::cout << std::setw(16) << names(i) << "\t"
		    << std::setw(11) << V(i) << "\n";
        }

    } catch(std::exception& ex) {
        std::cerr << "Exception caught: " << ex.what() << std::endl;
    } catch(...) {
        std::cerr << "Unknown exception caught" << std::endl;
    }

    exit(0);
}

/computers/linux/debian/packages | permanent link

Thu, 24 Sep 2009

digest 0.4.0 and 0.4.1
After almost two years, I just made a small update to the digest package for R by adding sha-256 as another supported hashing function. While at this, a few minor edits where made here or there. Version 0.4.0 also included a file src/Makefile.win but as that actually prevents a successful build on the Windows platform I promptly removed it for a (more-or-less brown-bag) release 0.4.1. Thanks to Uwe Ligges and his automated win-builder service that permits easy unattended build tests on that platform.

The new package will appear shortly on its CRAN page; the R-Forge page has access to the Subversion repo etc and otherwise there's always my local my local digest page.

Oh, and 0.3.1 was never blogged about as it was just a maintenance release that added a single cast and an edit to the DESCRIPTION file.

/computers/linux/debian/packages | permanent link

Sun, 20 Sep 2009

RInside release 0.1.0 -- and now on CRAN
Version 0.1.0 of RInside, my C++ wrapper classes which facilitate embedding R into your own C++ application, has been released and is now an official CRAN package.

This release improves on the build process and should work on any sane Unix-alike operating system. A few more examples were added or extended. Details and the full ChangeLog are on my RInside page, and there is now a RInside page on CRAN as well.

/computers/linux/debian/packages | permanent link

Sun, 13 Sep 2009

Chicago Half Marathon 2009
Today it was once again time for the Chicago Half Marathon (which I have now been running in 2003, 2004, 2005, 2006, 2007 and 2008). Conditions were much much better than last year's very heavy rainfall---we were once again treated to a sunny and clear Chicago sky. It was however a little on the humid side and got somewhat warm; a few friends I talked to suffered on the second half of the race and I also slowed down.

As for the race itself, I didn't run it quite as evenly as I had hoped, faded a little around mile ten and eleven and came in at 1:34:54, or just under 7:15 min/mile. Not a bad time---I have done better (e.g. last year) but also worse. All in all still one my very favourite races, and this year with a once-again improved course that featured even more running along the lake. I will probably be back next year.

/sports/running | permanent link

Sun, 06 Sep 2009

RQuantLib 0.3.0 Windows build snag
Yesterday's upload of RQuantLib 0.3.0 contained one minor oversight: I had failed to update src/Makefile.win to the new and enlarged set of source files. The proper fix (of using wildcards and implicit rules) was simple, and Uwe Ligges kindly rebuilt RQuantLib on the Windows builder for CRAN using an updated Makefile so that binaries for Windows will be available. This fix will also be in the next upload. Should you need it in the meantime, here is a link to the new version directly from SVN.

/computers/linux/debian/packages | permanent link

Sat, 05 Sep 2009

RQuantLib 0.3.0 released
Earlier this evening, I rolled up a new version of RQuantLib. It has been pushed to CRAN and Debian, and source and binary version should appear on the respective mirror networks in due course.

This version, the first in a new '0.3.*' release series, contains all the work that Khanh Nguyen did during his Google Summer of Code participation which I had mentioned a while back and for which I acted as mentor.

And Khanh did great. We now have a lot more Fixed Income functionality; I include the full ChangeLog entry below. I also added some simple calendaring support and the odd fix here or there while mentoring. All of this had been available while technically 'in progress' thanks to support provided by the R-Forge project hosting where SVN checkouts as well as nightly binaries are provided. A few more details are on the RQuantLib page and I hope to add a few more examples.

As promised, the ChangeLog entry:

2009-09-05  Dirk Eddelbuettel  

	* DESCRIPTION: Release 0.3.0 reflecting all the excellent
	  Google Summer of Code 2009 work by Khanh Nguyen as well
	  as other small enhancements

	[ Changes by Khanh Nguyen below ]

	* R/bond.R: Added pricing functionality for various new instrument
	* R/discount.R: Idem
	* src/bonds.cpp: Idem
	* src/discount.cpp: Idem
	* src/utils.cpp: Idem

	* man/Bond.Rd: Added documentaiont for new functions
	* man/CallableBond.Rd: Idem
	* man/ConvertibleFixedCouponBond.Rd: Idem
	* man/ConvertibleFloatingCouponBond.Rd: Idem
	* man/ConvertibleZeroCouponBond.Rd: Idem
	* man/Enum.Rd: Idem
	* man/FittedBondCurve.Rd: Idem
	* man/FixedRateBond.Rd: Idem
	* man/FixedRateBondCurve.Rd: Idem
	* man/FixedRateBondPriceByYield.Rd: Idem
	* man/FixedRateBondYield.Rd: Idem
	* man/FloatingRateBond.Rd: Idem
	* man/ZeroCouponBond.Rd: Idem
	* man/ZeroPriceByYield.Rd: Idem
	* man/ZeroYield.Rd: Idem

	* rests/RQuantLib.R: Added tests for new functions
	* rests/RQuantLib.Rout.save: Added tests ouput for new functions

	[ Changes by Dirk Eddelbuettel below ]

	* man/BondUtilities.Rd: Added documentation for new function

	* R/calendars.R: Add support to access QuantLib calendars from R
	* src/calendars.cpp Idem
	* man/Calendars.Rd: Idem

	* src/bonds.cpp: Small C++ fixes to suppres g++ warnings
	* INDEX: Updated via 'R CMD build --force'
	* inst/QuantLib-License.txt: Updated to version from QL 0.9.7

/computers/linux/debian/packages | permanent link

Wed, 12 Aug 2009

random 0.2.1
A maintenance fix was applied to random: following the changes in release 0.2.0 a few months ago that reflected changes at the random.org site, we needed to make one more change in randomSequence. Thanks for Lynn Amon for spotting this.

The new package is available here and should appear on CRAN shortly.

/computers/linux/debian/packages | permanent link

Tue, 04 Aug 2009

State of the Art in Parallel Computing with R: Now published
Our survey paper on the current state of the art in parallel computing with R, previously mentioned here as a technical report is now out as Vol 31, Issue 1 of the all-electronic Journal of Statistical Software.

/computers/R | permanent link

Mon, 03 Aug 2009

Rcpp 0.6.6
Version 0.6.6 of Rcpp [ a set of C++ classes making it easier to glue C/C++ code to R ] went off to CRAN and Debian earlier as another small maintenance release.

While the diffstat output that will appear in cranberries may look impressive, it stems chiefly from updating the Doxygen documentation of the C++ classes. Only one small feature was added: one can now test via exists() whether a named parameter exists in an instance of the RcppParams class.

/computers/linux/debian/packages | permanent link

Sun, 19 Jul 2009

New RInside release
I just rolled up a new release of RInside, my C++ wrapper classes which facilitate embedding R into your own C++ application.

This releases owes a big Thank you! to Miguel Lechón who not only noticed errant behaviour and occassional segfaults with overly long commands sent to the embedded R, but even traced it to an oversight of mine in a simple memory buffer class and provided the one-line fix to reset a pointer! Much appreciated, especially as I got his mail two days before I talked about Rcpp and RInside at UseR! 2009 . The other changes are mostly cleanups, additions of two more test examples (to replicate the bug report) and some minor additions of a few new assign() functions to pass data between C++ and the embedded R session.

/computers/linux/debian/packages | permanent link

Mon, 13 Jul 2009

cran2deb: Would you like 1700+ new Debian / R packages ?
As I mentioned in my quick write-up of UseR 2009, one of my talks was about cran2deb: a system to turn (essentially) all CRAN packages into directly apt-get-able binary packages.

This is essentially a '2.0' version of earlier work with Steffen Moeller and David Vernazobres which we had presented in 2007. Then, the approach was top-down and monolithic which started to show its limits. This time, the idea was to borrow the successful bottom-up approach of my CRANberries feed.

The bulk of the work was done by Charles Blundell as part of his Google Summer of Code 2008 project which I had suggested and mentored. After that project had concluded, we both felt we should continue with it and bring it to 'production'. The CRAN hosts provided us with a (virtual Xen) machine to build on, and we are now ready to more publically announce the availability of the repositories for i386 and amd64:

  deb http://debian.cran.r-project.org/cran2deb/debian-i386 testing/
and
  deb http://debian.cran.r-project.org/cran2deb/debian-amd64 testing/

A few more details are provided in our presentation slides. We look forward to hearing from folks using; the r-sig-debian list may be a good venue for this.

/computers/R | permanent link

Sun, 12 Jul 2009

useR 2009 in Rennes: Recap and slides
I spent most of last week in Rennes, the capital of Brittany in France, as it was time for UseR! 2009, the annual R conference. Francois Husson, Aline Legrand and others at the Agrocampus Ouest had put together a really well-run conference, and it was a pleasure to reconnect with so many people. It was also pretty nice to walk around town and see bits and pieces of the Tombees de la nuit festival which happened at the same time.

As last year (and again at the BoC in December), I presented a three-hour tutorial on high-performance computing with R. This covers profiling, vectorisation, interfacing compiled code, debugging, parallel computing, as well as scripting and automation. Slides, and a 2-up version, are now on my presentations page.

I also gave two regular conference presentations. The first was on my Rcpp and RInside packages which facilitate interfacing R and C++. The second talk, based on joint work with Charles Blundell, describes our cran2deb system for creating Debian packages of essentially all CRAN packages. I will try to follow up on this with another post. Slides from these talks are also on my presentations page.

/computers/R | permanent link

Sat, 27 Jun 2009

R 2.9.1, CRANberries outage, and missing Java support
Just a short note that version 2.9.1 of R was released yesterday. And a corresponding Debian release went out as usual on the same day. One sour note: as the Java toolchain is currently broken, I had to disable compile-time support for Java. Just run R CMD javareconf once installed if you need it.

Speaking of broken, I had neither noticed that this R version now returns an additional field (for the repository) in the per-package metadata via available.packages(), nor that this change had broken my oh-so-useful and increasingly popular CRANberrries html and rss summaries of CRAN changes. So with the usual beta and rc releases or R 2.9.1 in Debian starting a week prior, CRANberries had been silent for six days from Friday the 21st to last Thursday. I rectified it once I noticed, and changed the code to no longer fall on its nose at that spot. Sorry for the few days without service.

/computers/R | permanent link

Sun, 31 May 2009

Ubuntu Developer Summit in Barcelona
Due to some things falling into place, I had an opportunity to attend the first two days of last week's Ubuntu Developer Summit in beautiful Barcelona. Somehow, I had never managed to attend a Debian conference either, so it was good to meet a few of the old Debian hands now moving Ubuntu along, as well as a few of the Ubuntu folks. I also gave a short presentation on R in Debian / Ubuntu and the plans for the upcoming Ubuntu release. More on that another time.

All told, a well-organised conference in a nice setting -- two stone throws from the legendary Camp Nou. Unfortunately, I had to leave by Wednesday so I missed what was undoubtedly quite a scene in Barcelona following Barca's dismantling of Man U in this year's Champions League final.

/computers/misc | permanent link

Sat, 30 May 2009

JPM Chase Corporate Challenge 2009
The 28th annual JP Morgan Chase Corporate Challenge race took place a couple of days ago May 21. Participation was down from the record of 23,000 runners set last year at around 17,125. With splendid weather, it is always a nice way to start the Memorial day weekend.

We fielded a small but spirited team of nine runners. I finished with a decent (hand-stopped) time of 22 minutes and 27.93 seconds for the 3.5 miles -- or a 6:25 min/mile pace. That is among the fasters times but not quite the fastest compared to the other six times I have run this.

Most importantly, everybody seems to have had a blast. And we did set a record for longer post-race party which sets a nice precedent for 2010.

/sports/running | permanent link

Sat, 23 May 2009

Temporary Debian mail outage
It would appear that debian.org rejected mail for maybe up to twelve hours from late yesterday afternoon (Central timezone) to some time shortly after I got up this morning. Things appear to be back to normal, so a big Thanks to the mail admins.

If you happened to have sent me mail to my debian.org address during that time period, you may have gotten a hard reject ('550 Administrative prohibition') as did a test mail of mine. In this case mail may not be respooled, so please do send it again.

My alternate address, formed by my first name followed by the family name and the commercial top-level domain, remained functional as a fallback.

/computers/misc | permanent link

Fri, 01 May 2009

Brad Mehldau at the CSO
Just got home from a wonderful concert by Brad Mehldau at the CSO. This was long overdue as I kept reading about Mehldau. And even though he performs quite regularly around here, I had never seen him. Big mistake.

The first set was performed as a (strictly acoustic) trio with Larry Grenadier on bass and Jeff Ballard on drums. After several compositions by Mehldau and a brazilian samba piece, the first set closed with a rendition of 'Holland' from Sufjan Stevens' album Michigan which was truly beautiful. The second set had Mehldau performing solo, again with several compositions of his own as well as one from Neil Young's classic 'The Needle and the Damage Done' leading two two pieces from the Sound of Music including an amazing, yet really different 'My favourite things' that just hushed a piece of the central melody along with a strond rhythmic element. Lovely. And then to cap it all off, four encores.

Highly recommended.

/music/jazz/live | permanent link

Thu, 30 Apr 2009

GSoC 2009 Chicago area meeting
Thanks to the effort of the tireless Borja Sotomayor for the local ACM chpater as well as the good folks at Google in Chicago, we had a local kickoff meeting for this year's Google Summer of Code at Google's Chicago office. A few accepted GSoC students, mentors, and a few Google engineers gave short presentations to a bunch of ACM-affiliated students from U of C, Northwestern, DePaul, IIT, UIC, ... I gave my first ever 'lightning talk' --- on R and the GSoC --- and after chatting a bit more rushed home to catch the end of the amazing triple-overtime win of the Bulls over the Celtics. Go Bulls for the improbable game seven in Boston!

/computers/misc | permanent link

Wed, 29 Apr 2009

Slides from most recent R and HPC tutorial
A little earlier I put the slides from my Introduction to High-Performance Computing with R tutorial at the R / Finance conference last week onto my talks / presentation page. Other tutorials, talks and keynotes are also being posted on the conference program page.

This tutorial was a shorter format of just an hour which did not allow for any parallel computing with R. However, parallel computing with R via MPI, snow, nws, ... is covered in the slides from December's workshop at the BoC.

/computers/R | permanent link

Tue, 28 Apr 2009

Google Summer of Code 2009: R / Quantlib
With everything that has been going on of late, I have yet to mention that Khanh Nguyen, a Ph.D. student in Computer Science at U Mass / Boston, will be working with me on RQuantLib as part of the Google Summer of Code program this year.

We had twenty-two applications to review for the R project, including three for the RQuantLib topic I had proposed. Khanh's application was clearly among the best, and I look forward to helping him do cool stuff over the summer. He already posted two short emails on the r-sig-finance and the quantlib-user lists soliciting suggestions and comments. So if you have comments regarding R and QuantLib, please get in touch with him or me!

/computers/misc | permanent link

Mon, 27 Apr 2009

Review of 'Analysis of Integrated and Cointegrated Time Series with R (2nd ed)' in JSS
A few weeks ago I wrote up a short review of Bernhard Pfaff's nice (but somewhat dry) Analysis of Integrated and Cointegrated Time Series with R (2nd ed) on unit root and cointegration modeling with R. This is now online at the Journal of Statistical Software.

/computers/R | permanent link

Sun, 26 Apr 2009

R / Finance 2009
Our inaugural R / Finance conference, mentioned here twice is now over.

We were fortunate to get seven outstanding invited keynote speakers, as well as eleven excellent presentations. This was preceded by four short tutorials (and I'll post slides from my Introduction to High-Performance Computing with R soon). With about 150 registered participants, plus keynoters, presenters, committee members, representatives from the sponsors (a quick shout of Thanks! to them), some folks from UIC (especially Holly without whom few things would have happened), we were probably around 200 people gathered at UIC. And then there was an extended social program at Jaks which is rather appropriate as we had numerous important committee meetings there over the preceding months. All in all it seems like a successful event. We may even do it again.

/computers/R | permanent link

Thu, 23 Apr 2009

Real nice Boston Marathon writeup
This article from the Boston Globe gives an excellent description of what running Boston last Monday was like, and why we keep coming back, almost regardless. The writer, for whom it was the fifth Boston and ninth total, expresses the range of emotions, expectations, frustrations, excitements, ups, downs, ... all of which form the challenge of racing a marathon in general, and on this course on a windy day in particular. And just like she concludes that the finish of one marathon leads to planning the next, I registered last night for the Chicago Marathon on October 11, apparently around twelve hours before it sold out.

And so it is with regrets that I have to decline Christian's invitation to run Cologne with him on October 4. Another time, hopefully.

/sports/running | permanent link

Wed, 22 Apr 2009

Boston Marathon 2009
Monday was the 113th Boston Marathon. Just like in 2007 (and having skipped last year as I ran London the week before), I went as part of a group of local running friends. We once again had a blast---Boston on Marathon weekend is a real spectacle. Lots of people, lots of excitement, and this time even great weather.

The race itself was challenging. Having done it once before, and having come off a really decent last marathon, I may have underestimated the impact of the famous hills. This really is a wonderful but challenging course. Combined with the poor training conditions during this last Chicago winter which forced us indoors for quite a few long runs, as well as a somewhat upset stomach which forced a two-minute break, I came up short and posted an underwhelming second half. The head wind was also a factor that was mentioned in a few reports on the comparatively slow times of the elite runners. So when all was said and done, I ended up with a time of 3:30:13 and 8:01 min/miles which is a little slower than last time.

All in all a really great marathon weekend. As my time from Berlin qualifies me for Boston 2010, I may well be back next year.

/sports/running | permanent link

Fri, 10 Apr 2009

New Garmin Forerunner
Going for a run--or a race--almost always meant grabbing the GPS and often also meant setting a target pace and distance. For the last four and a half years, this was measured by a Garmin Forerunner 201. That's the large rectangular model in the original "brick" form factor. I've come to love the device. Training is great because the distance log, as well as the pacing, keeps you honest. Racing is probably better because it helps a lot with the pacing (but then I also had PRs in race where I had forgotten the GPS at home). But there is a downside. This model sometimes takes forever to find tracking, and has interference / weak signal problems when it is cloudy or moist. But worst of all, it just bonks out in the 'urban jungle' downtown where it drops signals too easily. And now after all these years the display had some minor damage, the strap didn't really hold anymore, and it was generally time for something new. On Tuesday it even lost a quarter mile when we were going for a short but really fast three miler.

But then a few days prior I had followed fellow Debian marathoner Christian and used my birthday at the end of this month (as well as the upcoming Boston Marathon) as an excuse for conspicuous comsumption. After some price comparison, I ordered a factory reconditioned Garmin Forerunner 405 from this web discounter at a nice rebate to the regular price. It arrived this afternoon, seemingly shining new and I have been fiddling with it for the last little while.

This device features wireless data transfer to a usbstick. This meant booting the laptop in windoze for the first time in years to load the 'client software' after which data transfer proceeded. The Garmin Connect site has very slick presentation and aggregation of the data. The trouble is of course how to get the data there when running Linux... Christian had mentioned the garmin-forerunner-tools package. Unfortunately, this seems to really be written for the Forerunner 305 models as it doesn't see the device at all. Some more googling lead to this page and the gant tarball. All still fairly raw, but with some prodding in the settings of the 405 ('pairing' set to 'on', 'force send' set to 'yes'; which may have to be reset each time ?) I got my two xml files off the gps watch. Yay. We'll see what mode I will settle one. With the 201 and its ancient serial port, I basically just dropped the run and training histories which their fairly limited data collections.

Last but not least, fellow Oak Park runner Peter Sagal had a humorous Runner's World column on the whole GPS geekyness. If he'd only known how to pair it with programming geekyness...

/gadgets | permanent link

Wed, 01 Apr 2009

Rcpp 0.6.5
A minor new maintenance release 0.6.5 of Rcpp just went off to CRAN and Debian. This version corrects a small oversight for the OS X build, and adds the LGPL as file COPYING to the sources.

/computers/linux/debian/packages | permanent link

Mon, 16 Mar 2009

Dianne Reeves at Dominican
Yesterday afternoon, we had another chance to see Dianne Reeves (wikipedia). This time, it almost felt like she came to us as she was headlining at the annual trustee benefit concert at Dominican University, a small college about a mile from our place. And as in 2007 and 2003, she did not disappoint. Great voice, great stage presence. Highly recommended.

/music/jazz/live | permanent link

Sun, 15 Mar 2009

2009 March Madness Half Marathon in Cary
This morning it was once more time for the annual March Madness Half Marathon in Cary. This race is basically the start of the running season in Chicagoland. And we could not have asked for better weather. After a really cold and long winter, and a short snapback to really cold temperatures this week, it started to warm up a little yesterday with expectations of more of the same today. So while it was still cold at the start at around 37 degrees, most runners opted for shorts and by the finish temperatures were in the high 40s. Coupled with clear blue skies and no wind, it was a really nice morning for a run.

So how did it go? Well, I had pretty low expectations. Training has been difficult with too much snow, rain and plain cold weather. So like most of my running friends, motivation ran pretty low of late. I was really only trying to set a modest pace, and to hope to hang on to it and run steadily. That worked: I didn't walk a single water stop, and while my legs were getting really tired and sore I carried through to the end. Final time was 1:36:08.57 per my stop watch. That's a tad faster than last year, a lot slower than 2007, just a tad slower than 2006, and quite a bit faster than 2005.

Next stop: my second Boston Marathon in five weeks and given the underwhelming training this winter, it will be a challenge.

/sports/running | permanent link

Thu, 05 Mar 2009

Short introduction to R in Finance
Adam Gehr of DePaul University's Finance Department had organized a panel session about R in Finance at the Midwest Finance Association's 58th Annual Meeting which is happening this week here in Chicago.

I just posted my slides on my presentations page. The slides give a brief overview of R, the CRAN network and the by now over 1600 packages, mention the Finance Task View, briefly present four different packages (or package sets) and of course beat the drum for our upcoming R/Finance conference that will take place here in Chicago at the end of next month.

/computers/R | permanent link

Tue, 03 Mar 2009

RQuantLib 0.2.11
The changes in Rcpp that I blogged about a few days ago required a few small changes in RQuantLib. Not really much more that prefixing std:: in a number of variable declarations and a few member function calls -- so this is definitely a minor maintenance release. New source and binary packages have already been pushed to CRAN and Debian.

/computers/linux/debian/packages | permanent link