R Interface to the 'Yacas' Computer Algebra System

Interface to the 'yacas' computer algebra system (< http://www.yacas.org/>).

Build Status Build status

Ryacas is an R interface to the free yacas Computer Algebra System. Ryacas allows one to send R expressions, unprocessed yacas strings and certain other R objects to yacas process from R and get back the result. It also has facilities for manipulating yacas strings and R expressions destined for yacas processing.

It can be used for exact arithmetic, symbolic math, ASCII pretty printing and translating R to TeX.

Install from github

To build and install from github using R 3.3.0 (or later) and the R devtools package 1.11.0 (or later) run this command from within R:


Online info

For vignettes, overview, pointers to additional information, installation instructions and a sample session see http://mikldk.github.io/ryacas/. The old site was http://code.google.com/p/ryacas/.

Yacas documentation can be found at http://yacas.readthedocs.org/


Once Ryacas is installed, pointers to additional information can be found with these R commands:



The package contains stripped-down yacas distribution. For the complete yacas source code see https://github.com/grzegorzmazur/yacas/ . For more information on yacas see http://www.yacas.org/.

Rob Goedman, goedman at mac dot com
Gabor Grothendieck, ggrothendieck at gmail dot com
Søren Højsgaard, sorenh at math dot aau dot dk
Ayal Pinkus, apinkus at xs4all dot nl
Grzegorz Mazur, teoretyk at gmail dot com
Mikkel Meyer Andersen, mikl at math dot aau dot dk


Changes in version 0.4.1

o TeXForm() now returns character vector (without $'s at the beginning and end) o New as.Sym.matrix()/as.Sym.character() that converts a character matrix/vector to a yacas matrix (see "Matrix and vector Sym objects" vignette), can be disabled via Ryacas_options. o Transpose() added o Added silent/invisible yacas() function called syacas() o Additional vignettes o More tests o Internal

  • Enabled use of devtools::load_all() via .onLoad() and .yacas_init_force()
  • Converted to Roxygen documentation
  • Vignettes in Rmarkdown format
  • pkgdown for GitHub Pages for http://mikldk.github.io/ryacas/

Changes in version 0.3-4

o Maintainer changed to Mikkel Meyer Andersen [email protected] o Changed from using XML to xml2

Changes in version 0.3-3

o updated to yacas 1.6.1

Changes in version 0.3-2

o removed dontruns o minor bugfixes

Changes in version 0.3-1

o removed external dependency on yacas

  • yacas is incorporated into the package instead of being spawn as a separate process
  • interface between R and yacas makes use of Rcpp wrapper generator o removed all functions related to downloading, installing and spawning yacas o removed runYacas() function, use a separate yacas session instead o added simple tests using testthat package o changed text encoding from latin1 to utf-8

Changes in version 0.2-11

o modifications needed to work in R 2.14

Changes in version 0.2-10

o fixes to pass R CMD CHECK

o added INSTALL file

Changes in version 0.2-9

o DESCRIPTION file specifies XML version 2.1-0 or later

o minor documentation improvements to address R 2.9.0

Changes in version 0.2-8

o added additional Solve examples to vignette

Changes in version 0.2-7

o socket timeout improvement from Petr Savicky

o added Encoding: line to DESCRIPTION file

o minor changes to satisfy R 2.6.0

Changes in version 0.2-6

o fixed some documentation bugs

Changes in version 0.2-6

o fixed bug in haveYacas

o fixed bug in runYacas

o removed some, but not all, platform dependencies from yacas.R

Changes in version 0.2-5

o srcfile= added to parse call in yacas() and Sys.putenv replaced with Sys.setenv so yacas works with R 2.5.0

Changes in version 0.2-4

o new Windows only features

  • yacas.exe, scripts.dat no longer included in Ryacas distribution
  • new Windows-only yacasInstall and yacasFile commands to facilitate installation of yacas
  • .First.lib reminds Windows users to install yacas if yacas not found

o Ryacas now uses yacas 1.0.63 on all platforms. (The yacas Windows binary is available in the relevant zip file under Downloads tab on Ryacas home page. On Windows yacasInstall() will download it, extract yacas.exe and scripts.dat and place them both in ...\Ryacas\yacdir.)

o yacas is now started in single user server mode (this new mode was added to yacas as of yacas version 1.0.62)

o runYacas now uses wait = FALSE on Windows

o fixed bug in yacasInvokeString (it was ignoring init.args)

o fixed latex bug in Sym.Rd

o verbose= argument of yacas command can now take not only TRUE and FALSE but also "input" and "output"

o added "yacas" method for the yacas generic

o the two vignettes are combined into one

Changes in version 0.2-3

o Ryacas-Sym vignette fixed

o most .Sym methods have been made .default methods

o Identity, Identity.default added

o new YACAS_INVOCATION_STRING environment variable can be set to override the default yacas invocation string. (It also overrides the settings of the other YACAS_ environment variables which are only available on Windows.) Thanks to Simon Blomberg for discovering certain possible startup problems. This should provide a general "out" for these on systems that need it.

o method = "system" in yacas command now works at least on Windows

o yacas method argument defaults to getOption("yacas.method") and to "socket" if that is not set.

Changes in version 0.2-2

o bug fixes in R to yacas parser

o added yacas.formula

o new runYacas function

Changes in version 0.2-1

o \dontrun{...} on all examples to avoid Rcmd check problems

o new Ryacas-prettyPrinter demo

Changes in version 0.1-11

o yacas now starts up when the first time the yacas command is given for method = "socket" rather than at package startup (or if the user explicitly invokes the optional yacasStart() function).

o new yacas method = "system" argument which uses the R "system" command to spawn a new instance of yacas each time yacas is called and so does not require sockets. The default continues to be method = "socket".

o new command yacasInvokeString which outputs the invocation string for yacas (with no trailing &).

o yacasStop has a verbose argument (like yacasStart).

o yacas.character has an addSemi argument that defaults to TRUE.

o WISHLIST updated

Changes in version 0.1-10

o yacas is now a generic with character and expression methods

o added method= argument to yacas (currently unused)

o yacasStop now closes (and on Windows XP Pro kills) yacas. Previously it was only done on detaching the yacas package.

o minor improvements in help file (more are needed)

Changes in version 0.1-9

o bug fixes

Changes in version 0.1-5

o yacmode function from yacasR added

o yacas.start renamed and yacas.stop renamed to yacasStart and yacasStop. yacasStart has a verbose argument that defaults to FALSE. yacasStart is used in the yacas example.

o yacas now has verbose = FALSE by default but returns yac.res

o WISHLIST updated

Changes in version 0.1-4

o taskkill used instead of pskill for Windows. Now no auxilliary process termination utility is used but only XP Pro will get its yacas process terminated on exit.

Changes in version 0.1-3

o yparse and associcated routines added

o windows now kills process using pskill.exe which is included

o yacas binary 1.0.57 for Windows now included

o bracket counting rewritten

o yacas now has a verbose= argument (defaults to TRUE)

Changes in version 0.1-0

o expression processing rewritten

o translation of expressions moved to Yacas (R.ys, Rtrans.ys)

o ported to UNIX (previously Windows only)

o environment variables YACAS_HOME, YACAS_SCRIPTS and YACAS_INIT can be used to override default locations of yacas, scripts.dat and R.ys .

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("Ryacas") by Mikkel Meyer Andersen, 10 months ago

https://github.com/r-cas/ryacas, http://www.yacas.org

Report a bug at https://github.com/r-cas/ryacas/issues

Browse source code at https://github.com/cran/Ryacas

Authors: Mikkel Meyer Andersen [aut, cre, cph] , Rob Goedman [aut, cph] , Gabor Grothendieck [aut, cph] , Søren Højsgaard [aut, cph] , Grzegorz Mazur [aut, cph] , Ayal Pinkus [aut, cph] , Nemanja Trifunovic [cph] (UTF-8 part of yacas (src/yacas/include/yacas/utf8*))

Documentation:   PDF Manual  

Task views: Numerical Mathematics

GPL license

Imports Rcpp, stats, methods, magrittr

Suggests devtools, exams, knitr, Matrix, pkgload, rmarkdown, igraph, testthat, unix, Rmpfr

Linking to Rcpp

System requirements: C++11

Imported by ch, droll, poolfstat, seeds, shattering, symSEM.

Suggested by nlsr.

See at CRAN