[R] Symbolic equations to R code?

Scott Rifkin sarifkin at ucsd.edu
Wed Nov 19 18:17:23 CET 2014


I'm looking for a package that would take a mathematical function 
written in symbolic notation and convert it into R code.

What I have in mind would be something like the following:

1) Have a GUI (e.g. something like Microsoft Word equation editor, but 
computer readable) to produce an equation so that it would look just 
like it would if you were writing it on paper

2) Have some way to translate the GUI into some markup language (perhaps 
this would be in a non-R application)

3) Have code that translates the markup into an R function.

My motivation is that I teach an intro stats class that uses 
randomization techniques. I would like for the students to be able to 
make up their own statistics and then simulate null distributions or 
estimate bootstrap confidence intervals using them. I'd prefer to make 
it as easy as possible for them to enter the formula for their 
statistics into the computer, and I think that will be easier if it 
looks from their end just like it would if they were writing it on 
paper.  After they submit the equation, I would have an RStudio shiny 
applet take care of the rest.

Any suggestions for R packages that could do this or pieces of it would 
be very much appreciated.

Thanks,
Scott



More information about the R-help mailing list