Skip to contents

toexpr(x) returns an R language object for an expression or equation, as Symbolics' toexpr. Variables become names or calls such as x(t), derivatives Differential(t)(x(t)), and equations lhs ~ rhs.

Usage

toexpr(x)

Arguments

x

An expression, equation, or list of them.

Value

A language object, or a list of them.

Examples

t <- t_nounits; D <- D_nounits
x <- Variable("x", t); k <- Parameter("k")
toexpr(D(x) ~ -k * sin(x))
#> Differential(t)(x(t)) ~ -(sin(x(t)) * k)