caracas

caracas: Computer algebra in R - Published in JOSS (2021)

https://github.com/r-cas/caracas

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

Computer algebra in R

Basic Info
  • Host: GitHub
  • Owner: r-cas
  • License: gpl-2.0
  • Language: R
  • Default Branch: master
  • Size: 3.04 MB
Statistics
  • Stars: 27
  • Watchers: 3
  • Forks: 2
  • Open Issues: 31
  • Releases: 10
Created about 6 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License Code of conduct

README.Rmd

---
output: github_document
---



```{r, echo = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  message = FALSE
)
```

# `caracas`: Computer algebra in R


[![R build status](https://github.com/r-cas/caracas/workflows/R-CMD-check/badge.svg)](https://github.com/r-cas/caracas/actions) 
[![codecov](https://codecov.io/gh/r-cas/caracas/graph/badge.svg?token=HF9MZ6AUWA)](https://app.codecov.io/gh/r-cas/caracas)

  
## Installation

`caracas` is available on CRAN and can be installed as usual:

```
install.packages('caracas')
```

Two more steps must be completed before `caracas` can be used:

### Installing python

`caracas` uses python (and in particular the python library SymPy). Therefore python (version > 3) must be installed, which can be done as follows: Go [here](https://www.python.org/downloads/) and download the version for your computer. 

For windows users: During installation you can check "add python to the computers path" or similar. It is important that you check this box.

### Installing SymPy

Please ensure that you have SymPy installed, or else install it:

```{r, eval = FALSE}
if (!caracas::has_sympy()) {
  caracas::install_sympy() 
}
```

## Using development versions of `caracas`

To build and install from Github with vignettes run this command from within `R` (please install `remotes` first if not already installed):

```
# install.packages('remotes')
remotes::install_github("r-cas/caracas", build_vignettes = TRUE)
```

You can also install the package without vignettes if needed as follows:

```
remotes::install_github("r-cas/caracas")
```

## Configuring the Python environment

The `caracas` package uses the [`reticulate`](https://github.com/rstudio/reticulate) package (to run Python code). Thus, if you wish to configure your Python environment, you need to 1) load `reticulate`, 2) configure the Python environment, and 3) load `caracas`. The Python environment can be configured as described [here](https://rstudio.github.io/reticulate/articles/versions.html). Again, this need to be done *before* loading `caracas`.

For linux users, specifically, do:

```
library(reticulate)
reticulate::import("sympy")
reticulate::py_install(packages="sympy")
reticulate::import("sympy") 
```

If the prompt says `Module(sympy)` things should be fine.




## Development site

See .

## Online documentation

See .

## Reference card

Reference card available at .

[
![Reference card](https://raw.githubusercontent.com/r-cas/caracas/master/refcard/caracas_refcard.png)
](https://raw.githubusercontent.com/r-cas/caracas/master/refcard/caracas_refcard.pdf)

## Origin of name

The name "caracas" is intended to mean "(inter)face to computer algebra system(s)" - notice that "cara" is Spanish (Castellano to be precise) for "face".

## Code of conduct

Please note that the `caracas` project is released with a Contributor Code of Conduct (available in `CODE_OF_CONDUCT.md`). By contributing to this project, you agree to abide by its terms.

## Brief introduction

```{r, message=FALSE}
library(caracas)
# options(caracas.print.prettyascii = TRUE)
```

```{r, include = FALSE}
if (!has_sympy()) {
  # SymPy not available, so the chunks shall not be evaluated
  knitr::opts_chunk$set(eval = FALSE)
}
```

```{r}
x <- symbol('x')
eq <- 2*x^2 - x
eq
as.character(eq)
as_expr(eq)
tex(eq)
```

```{r}
solve_sys(eq, x)
der(eq, x)
subs(eq, x, "y")
```

```{r}
A <- matrix(c("x", 2, 0, "2*x"), 2, 2)
B <- as_sym(A)
B
Binv <- inv(B)
Binv
tex(Binv)
```

```{r}
eigenval(Binv)
```

Please find more examples in the other vignettes available at .

## Contribute, issues, and support

Please use the issue tracker at  
if you want to notify us of an issue or need support.
If you want to contribute, please either create an issue or make a pull request.

Owner

  • Name: Computer algebra systems in R
  • Login: r-cas
  • Kind: organization

JOSS Publication

caracas: Computer algebra in R
Published
July 19, 2021
Volume 6, Issue 63, Page 3438
Authors
Mikkel Meyer Andersen ORCID
Department of Mathematical Sciences, Aalborg University, Denmark
Søren Højsgaard ORCID
Department of Mathematical Sciences, Aalborg University, Denmark
Editor
Nikoleta Glynatsi ORCID
Tags
cas mathematics symbolic mathematics statistics tex latex

GitHub Events

Total
  • Watch event: 1
  • Push event: 35
Last Year
  • Watch event: 1
  • Push event: 35

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 411
  • Total Committers: 3
  • Avg Commits per committer: 137.0
  • Development Distribution Score (DDS): 0.309
Past Year
  • Commits: 39
  • Committers: 1
  • Avg Commits per committer: 39.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Mikkel Meyer Andersen m****l@m****k 284
Søren Højsgaard s****h@m****k 126
olivroy 5****y 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 75
  • Total pull requests: 2
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 3 days
  • Total issue authors: 13
  • Total pull request authors: 2
  • Average comments per issue: 1.04
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mikldk (42)
  • hojsgaard (17)
  • bnicenboim (4)
  • Sciurus365 (2)
  • Nikoleta-v3 (2)
  • mckraqs (1)
  • mmaechler (1)
  • psads-git (1)
  • travis-leith (1)
  • selcukorkmaz (1)
  • Tripartio (1)
  • ethanholdahl (1)
  • stla (1)
Pull Request Authors
  • olivroy (2)
  • mikldk (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 536 last-month
  • Total docker downloads: 43,444
  • Total dependent packages: 0
  • Total dependent repositories: 2
  • Total versions: 10
  • Total maintainers: 1
cran.r-project.org: caracas

Computer Algebra

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 2
  • Downloads: 536 Last month
  • Docker Downloads: 43,444
Rankings
Docker downloads count: 0.6%
Stargazers count: 11.8%
Average: 15.9%
Forks count: 17.0%
Downloads: 18.2%
Dependent repos count: 19.2%
Dependent packages count: 28.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/check-full.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 3.0 depends
  • methods * depends
  • Matrix * imports
  • doBy >= 4.6.15 imports
  • magrittr * imports
  • reticulate >= 1.14 imports
  • Ryacas * suggests
  • knitr * suggests
  • magick * suggests
  • pdftools * suggests
  • qpdf * suggests
  • rmarkdown * suggests
  • testthat >= 2.1.0 suggests
  • tinytex * suggests