Skip to contents

Symbolic versions of trigonometric, hyperbolic, exponential, complex and piecewise elementary functions. The R generics sin(), cos(), exp(), log(), sqrt(), abs(), Re(), Im(), sym_Mod(), Arg(), Conj(), floor(), ceiling(), max() and min() also work on sym objects.

Usage

cot(x)

sec(x)

csc(x)

acot(x)

asec(x)

acsc(x)

coth(x)

sech(x)

csch(x)

acoth(x)

asech(x)

acsch(x)

sinc(x)

Abs(x)

re(x)

im(x)

conjugate(x)

arg(x)

frac(x)

Heaviside(x, h0 = NULL)

DiracDelta(x, k = 0)

KroneckerDelta(x, y, delta_range = NULL)

LambertW(x, k = 0)

Max(...)

Min(...)

root(x, n, k = 0)

cbrt(x)

real_root(x, n)

sym_atan2(y, x)

sym_Mod(x, y, ...)

Arguments

x, y

Expressions.

h0

Value of the Heaviside function at zero.

k

Branch index or derivative order.

delta_range

For KroneckerDelta(), an optional range (lower, upper) of the indices; an index outside it gives zero.

...

Expressions.

n

Root index.

Value

A sym expression.

Examples

x <- Symbol("x")
cot(sym_pi / 4)
#> 1
Abs(-3 * x)
#> 3*Abs(x)
Max(1, 2, x)
#> Max(2, x)