Archive for July, 2014

UseR 2014, days 3-4

21 Jul 2014

Three weeks ago, I’d commented on the first two days of the UseR 2014 conference. I’m finally back to talk about the second half.

Dirk Eddelbuettel on Rcpp

Dirk Eddelbuettel gave a keynote on Rcpp [slides]. The goal of Rcpp is to have “the speed of C++ with the ease and clarity of R.” He gave a series of examples that left me (who still uses .C() to access C code) thinking, “Holy crap this is so much easier than what I do!”

Take a look at the Rcpp Gallery, and the slides from Dirk’s Rcpp tutorial.

Dirk ended with a detailed discussion of Docker: a system for virtual machines as portable containers. I didn’t fully appreciate this part, but according to Dirk, Docker “changes how we build and test R….It’s like pushing to GitHub.”

Sponsors Talk

After Dirk’s talk was the Sponsor’s Talk. But if I’m going to skip a session (and I strongly recommend that you skip at least some sessions at any conference), anything called ”Sponsor’s Talk“ is going to be high on my list to skip.

Lunch at Venice Beach

Karthik Ram and I met up with Hilary Parker and Sandy Griffith for lunch at Venice Beach.

It took us a bit longer to get back than we’d anticipated. But I did get a chance to meet up with Leonid Kruglyak at his office at UCLA.

R and reproducibility

David Smith from Revolution Analytics and JJ Allaire from RStudio each spoke about package management systems to enhance reproducibility with R.

For your R-based project to be reproducible, the many packages that you’ve used need to be available. And future versions of those packages may not work the same way, so ideally you should keep copies of the particular versions that you used.

David Smith spoke about the R reproducibility toolkit (RRT). The focus was more on business analytics, and the need to maintain a group of versioned packages that are known to work together. CRAN runs checks on all packages so that they’re all known to work together. As I understand it, RRT manages snapshots of sets of packages from CRAN.

JJ Alaire spoke about RStudio‘s solution: packrat. This seems more suitable for scientific work. It basically creates privates sets of packages, specific to a project.

I’ve not thought much about this issue. packrat seems the best fit for my sort of work. I should start using it.

Poster session

The second poster session was in a different location with more space. It was still a bit cramped, being in a hallway, but it was way better than the first day. There were a number of interesting posters, including Hilary’s on testdat, for testing CSV files; Sandy’s on using Shiny apps for teaching; and Mine Çetinkaya-Rundel and Andrew Bray’s poster on “Teaching data analysis in R through the lens of reproducibility“ [pdf].

Met more folks

The main purpose of conferences is to meet people. I was glad to be able to chat with Dirk Eddelbuettel, Ramnath Vaidyanathan, and also Tim Triche. Also karaoke with Sandy, Karthik, Hilary, Rasmus, and Romain.

Wish I’d seen

I had a bit of a late night on Wednesday night, and then I was in a hurry to get down (via public transit!) to the Science Center to meet up with my family. So I’m sorry that I didn’t get to see Yihui Xie‘s talk on Knitr Ninja.

Looking back through the program, there are a number of other talks I wish I’d seen:


UseR 2014 was a great meeting. In addition to the packages mentioned with Days 1-2, I need to pick up Rcpp and packrat.

Slides for many of the talks and tutorials are on the UseR 2014 web site. If you know of others, you can add them via the site’s GitHub repository and make a pull request.

Why hadn’t I written a function for that?

16 Jul 2014

I’m often typing the same bits of code over and over. Those bits of code really should be made into functions.

For example, I’m still using base graphics. (ggplot2 is on my “to do” list, really!) Often some things will be drawn with a slight overlap of the border of the plotting region. And in heatmaps with image, the border is often obscured. I want a nice black rectangle around the outside.

So I’ll write the following:

u <- par("usr")
rect(u[1], u[3], u[2], u[4])

I don’t know how many times I’ve typed that! Today I realized that I should put those two lines in a function add_border(). And then I added add_border() to my R/broman package.

It was a bit more work adding the Roxygen2 comments for the documentation, but now I’ve got a proper function that is easier to use and much more clear.

Update: @tpoi pointed out that box() does the same thing as my add_border(). My general point still stands, and this raises the additional point: twitter + blog → education.

I want to add, “I’m an idiot” but I think I’ll just say that there’s always more that I can learn about R. And I’ll remove add_border from R/broman and just use box().

2014 UseR conference, days 1-2

2 Jul 2014

I’m at UCLA for the UseR Conference. I attended once before, and I really enjoyed it. And I’m really enjoying this one. I’m learning a ton, and I find the talks very inspiring.

In my comments below, I give short shrift to some speakers (largely by not having attended their talks), and I’m critical in some places about the conference organization. Having co-organized a small conference last year, I appreciate the difficulties. I think the organizers of this meeting have done a great job, but there are some ways it which it might have been better (e.g., no tiny rooms, a better time slot for the posters, and more space for the posters).