Posted on Categories Opinion, Programming

## wrapr::let()

I would like to once again recommend our readers to our note on `wrapr::let()`, an `R` function that can help you eliminate many problematic NSE (non-standard evaluation) interfaces (and their associate problems) from your `R` programming tasks.

The idea is to imitate the following lambda-calculus idea:

``` let x be y in z := ( λ x . z ) y ```

Posted on Categories Programming, Statistics, Tutorials6 Comments on Some Neat New R Notations

## Some Neat New R Notations

The `R` package `wrapr` supplies a few neat new coding notations.

An Abacus, which gives us the term “calculus.”

Continue reading Some Neat New R Notations

Posted on 1 Comment on Some programming language theory in R

## Some programming language theory in R

Let’s take a break from statistics and data science to think a bit about programming language theory, and how the theory relates to the programming language used in the R analysis platform (the language is technically called “S”, but we are going to just call the whole analysis system “R”).

Our reasoning is: if you want to work as a modern data scientist you have to program (this is not optional for reasons of documentation, sharing and scientific repeatability). If you do program you are going to have to eventually think a bit about programming theory (hopefully not too early in your studies, but it will happen). Let’s use R’s powerful programming language (and implementation) to dive into some deep issues in programming language theory:

• References versus values
• Function abstraction
• Equational reasoning
• Recursion
• Substitution and evaluation
• Fixed point theory

To do this we will translate some common ideas from a theory called “the lambda calculus” into R (where we can actually execute them). This translation largely involves changing the word “lambda” to “function” and introducing some parenthesis (which I think greatly improve readability, part of the mystery of the lambda calculus is how unreadable its preferred notation actually is).

Recursive Opus (on a Hyperbolic disk)
Continue reading Some programming language theory in R