The State of namingConventions in R

[This article was first published on Open Analytics - Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Last week’s 2013 useR! conference was filled to the brim with informative talks, but hands down the crown for most entertaining talk goes to Rasmus Bååth’s State of Naming Conventions in R presentation.

Rasmus’ lighthearted talk leveraged the strongest common bond among R users: collective suffering at the hands of R’s haphazard naming conventions. Who among us hasn’t fumbled away at the keyboard trying to recall the punctuation scheme of some scarcely used utility function?

Whereas other programming languages demand adherence to rigid naming conventions, R’s function names are a veritable circus.

R naming conventions

And that’s just in base R!

After several laughs over the dire state of affairs, Rasmus transitioned to exploring the negative consequences of heterogeneous naming conventions. Namely, they make R harder to learn and harder to use. For example, when trying to use the as.Date() function, a user might make several attempts before ultimately finding the correct function call.

as date

Clearly things could be better with the benefit of hindsight, and it was at this point in the talk that I began to wonder whether Rasmus could “bring things home”, so to speak. Yes, the conventions are chaotic, but just as we can’t tear up a city’s streets and relay them in a more intelligent configuration, we can’t simply rename all of R’s existing functions.

Naturally, Rasmus had a very practical suggestion:

use autocompletion

Autocompletion is a great tool, but in many IDEs autocompletion does not work if you’ve already made a mistake. For example, if users try to find the function ‘Vectorize’, autocompletion in some editors will leave them high and dry.


The onus, Rasmus argues, is on developers to bridge the gap between users and R’s inconsistent naming schemes.

Fortunately, that gap has already been bridged. Architect users have long enjoyed intelligent autocomplete functionality. Simply use ‘Ctrl + Space’ and the Architect editor will suggest matching functions, regardless of your exact syntax.

Ctrl Space Keys

Can’t remember the exact way to specify a function? No problem.

auto complete

auto complete

auto complete


Download Architect

Rasmus Bååth’s useR Blog

This post is about:
architect, useR

To leave a comment for the author, please follow the link and comment on their blog: Open Analytics - Blog. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)