R interface to ‘Giac’
Giac is a general purpose symbolic algebra software. It powers the graphical interface Xcas. This package allows to execute Giac commands in R. You can find the documentation of Giac here.
The ‘chromote’ package is used to create a Giac session. If the find_chrome()
function of ‘chromote’ returns NULL
, you can set the path to the Chrome executable (or Chromium, Brave, etc) to the environment variable CHROMOTE_CHROME
. Or you can pass it to the the Giac$new
function. Since the Chrome executable is in my system path, I can use Sys.which("chrome")
.
giac$execute(
"apply(simplify, solve([x^2+y+z=1, x+y^2+z=1, x+y+z^2=1], [x, y, z]))"
)
## [1] "list[[0,1,0],[1,0,0],[0,0,1],[sqrt(2)-1,sqrt(2)-1,sqrt(2)-1],[-sqrt(2)-1,-sqrt(2)-1,-sqrt(2)-1]]"