Skip to contents

Attempts to simplify expressions in an array or tensor. Non-array objects are coerced to arrays with as.array().

Usage

simplify(x)

Arguments

x

A character array() or tensor() consisting of mathematical expressions.

Value

A character array() or tensor() of the same form, potentially with simplified expressions.

Details

Instead of using an explicit call to simplify() you also have the option to enable automatic simplification via option(ricci.auto_simplify = TRUE). Note however that this comes at a significant performance cost.

This operation requires the Ryacas package.

Examples

simplify("x + y - x")
#> [1] "y"
#> attr(,"simplified")
#> [1] TRUE