Skip to content

Symbolic computation in R

3 messages · el_eli at gmx.de, Gabor Grothendieck, Trevor Davis

#
Hi,

I'm a R-newbie and not very familiar with the concepts of numeric and 
symbolic programming environments.
As an undergraduate student i have to compute a lot of symbolic stuff 
like partial derivatives or integrals.
For that purpose Maple or Mathematica are quite good tools, but i want 
to stick to R.
The following functions seem to be the ones to get symbolic derivatives:
D (expr, name)
deriv(expr, ...)
deriv3(expr, ...)
But i could'nt find any other functions for symbolic computation in R.
So here are my questions:

Is there a function to perform a symbolic integration?

Is there a way to solve an expresion like 2*x=y for x symbolically?

Best,

Eli
#
The Ryacas package provides an interface to the yacas symbolic
algebra system.  yacas is not very sophisticated when it comes to
integration but for the very simplest of cases it should be ok:
For more info see home page at
http://ryacas.googlecode.com
Loading required package: XML
[1] "Starting Yacas!"
expression(x^3/3)
expression(list(x == 2 * y))
Thank you for using yacas
On Sun, Jul 6, 2008 at 4:57 PM, el_eli at gmx.de <el_eli at gmx.de> wrote:
1 day later
#
Ryacas is the way to go if you need to stay in R, however R is 
relatively a much stronger numeric programming environment than symbolic 
programming environment.  For your symbolic math needs you might also 
want to check out SAGE which brings together many free open-source 
mathematics programs.  I find it more natural to do symbolic 
calculations in SAGE (just as I find it more natural to do statistics in 
  R).  Technically SAGE even comes with R although I prefer to maintain 
a separate additional installation of R.

Trevor Davis
Federal Reserve Board of Governors
el_eli at gmx.de wrote: