Why?

July 1, 2015

useR 2015: Romain Francois: My R adventures

Filed under: R, useR 2015 — Tags: , — csgillespie @ 8:05 am

Using R since 2002 and has been working on Rcpp, Rcpp11, Rcpp14 and dplyr
internals. Worked on a number of big projects.

  • 2005 he set up the R Graph Gallery
  • 2009 worked on rJava
  • 2010 Rcpp
  • 2013 dplyr

Key themes are Performance and usabililty

rJava 0.7-*

Creating objects was messy

d <-jnew("java/lang/Double", 42
.jcal(d, "D", "doubleValue)

rJava 0.8-*

d <- new(J("java/lang/Double"), 42)
d$doubleview

Also much easier to import java packages.

Rcpp

Suppose you have

double add(double a, double b){ return a+b;}

and you want to use it in R. This used to be a lot of work. Before Rcpp, you
used the R/C Api, i.e. use SEXP. A lot of work and boilerplate. With Rcpp the
number of characters needed to translate the simple function above went from 250
to 50. Around 66% of CRAN packages depend (on some way) on Rcpp.

RcppParallel (tbb: thread building blocks)

The package makes it much easier to run things in parallel. Amazingly, a simple
parallel version of sqrt is faster than sqrt

dplyr (everyone knows what it does)

Uses hybrid evaluation. Looking to bring RcppParallel in the (near?) future.

Please note that the notes/talks section of this post is merely my notes on the
presentation. I may have made mistakes: these notes are not guaranteed to be
correct. Unless explicitly stated, they represent neither my opinions nor the
opinions of my employers. Any errors you can assume to be mine and not the
speaker’s. I’m happy to correct any errors you may spot – just let me know!

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: