inst/examples/ex-arith.R

x <- as_composition(c(1, 2, 3))
y <- as_composition(c(1, 2, 1))

## Perturbation
perturbation(x, y)
x + y

## Powering
powering(y, 2)
y * 2

## Scalar product
scalar(x, y)

Try the nexus package in your browser

Any scripts or data that you put into this service are public.

nexus documentation built on June 8, 2025, 11:12 a.m.