-
Notifications
You must be signed in to change notification settings - Fork 13
SymEngine.R: Symbolic Computation in R
SymEngine is a standalone fast C++ symbolic manipulation library, which provides a fast computer_algebra_system , which is a lack in R. It has wrappers in several other languages, namely C, Python, Ruby, Julia and Haskell.
A prototype has been implemented at https://github.com/marlin-na/symengine.R
- There are several functions in base R for defferentiation, integration, solving system of equations, etc. E.g. `solve`, `stats::D`, `stats::deriv`, `stats::integrate`, `stats::numericDeriv`.
- R package Deriv for symbolic differentiation, it allows user to supply custom rules for differentiation.
- R package
numDerivfor calculating numerical approximations to derivatives. - R package
gmpandRmpfrprovide multiple precision arithmetic and floating point operations. They also include some special functions, e.g.Rmpfr::integrateRfor numerical integration. - R package mpc available at R forge. It provides multiple precision arithmetic for complex numbers.
- R package rSymPy provides an interface to ‘SymPy’ library in python via rJava.
- R package Ryacas provides an interface to the ‘Yacas’ computer algebra system. It is easier to install compared to `rSymPy`.
TODO
The project is expected to provide a fast computer algebra system and a seamless interface
within R.
It may also serve as an alternative interface to gmp, mpfr, mpc libraries.
The matrix system offered by SymEngine is also valuable for statistical computing.
This project idea is proposed by Jialin Ma <[email protected]>. Isuru Fernando <[email protected]> is willing to mentor on the symengine side. If you are interested in serving as an additional mentor please check out the current prototype and contact us.
You’ll have to store a pointer to SymEngine objects. For the test assume a SymEngine object is like below,
typedef struct {
double A;
double B;
} CStruct;Come up with a solution to create a struct, update the struct, delete the struct and showing the contents of the struct from R.
Students, please post a link to your test results here.