Extending R Syntax: in package space

6170c1d1970baf2a36a9ae2955e47ff3?s=47 Jim Hester
November 07, 2018

Extending R Syntax: in package space

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

6170c1d1970baf2a36a9ae2955e47ff3?s=128

Jim Hester

November 07, 2018
Tweet