SymEngine.R: Symbolic Computation in R - rstats-gsoc/gsoc2018 GitHub Wiki
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 differentiation, 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
numDeriv
for calculating numerical approximations to derivatives. - R package
gmp
andRmpfr
provide multiple precision arithmetic and floating point operations. They also include some special functions, e.g.Rmpfr::integrateR
for 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.
Possible mentors:
- Jialin Ma <[email protected]> proposed the project idea and implemented the prototype.
- Isuru Fernando <[email protected]> is one of the authors of symengine.
- Hans W Borchers <[email protected]>, author of R package “pracma” and “numbers”, mentor of previous R-GSoC projects including “RMaxima” in 2012.
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.
- Name: Jordao Okuma Bragantini
- Email: [email protected]
- University: University of Campinas
- Course: Bachelor in Statistics
- Solution: https://github.com/JoOkuma/RCStruct
Xin Chen (https://github.com/irexyc/test-symengine.R)