Photo by Riaan Myburgh on Unsplash

Extending R Syntax in package space

Abstract

R is a highly dynamic language with a long history of using syntax and language constructs to improve the usability, particularly in interactive use. Today the core of the R language is very stable and mature with tens of thousands of extension packages available and used by millions of people; which makes the addition of new syntax in R a challenge. However because R is so dynamic many improvements can be written in R packages without the need to modify the language itself. String interpolation with the glue package, piping with the magrittr package and tidy evaluation with the rlang package all added useful constructs to the R ecosystem without changes in base R. Extending this idea is the altparsers package, which allows the use of one or more alternative parsers to produce valid R code. This allows you to modify the syntax in ways not possible with the base parser while still avoiding the need to change the language syntax.

Date
Location
Boston, MA
Avatar
Jim Hester
Software Engineer

I’m a Senior Software Engineer at Netflix and R package developer.