A Parsing Playground for R Code

A test of WebR chunks in Quarto

Author

Matt Dray

Published

March 16, 2023

Parse the test

The simple function below helps expose R’s fundamental ‘tokens’. I wrote recently about parsing R in this way.

Click ‘Run code’ to declare the function and execute the example.

Now it’s your turn. Change the value of r_string below to a valid line of R code and then click ‘Run code’.

You can keep changing the value of r_string and pressing ‘Run code’ to see the effect.

Details

This is a test of:

You can find the source code for this page on GitHub.