CLOSED_FORM-cash-sym: List of symbols in the abstract syntax tree of the expression

CLOSED_FORM$symR Documentation

List of symbols in the abstract syntax tree of the expression

Description

A list, will be initialized after an instance is built.

Examples


# Constant variable
a <- 1

# Random uniform variable
b <- rand_uniform()

# Define a closed form expression
cf <- closed_form(~3 * (exp(a) + b))

cf

# Get the list of symbols
cf$sym

# Get the list of symbol names
cf$sym_name

# Get the list of symbol types
cf$sym_type

d <- rand_normal()

# Define a closed form expression with another closed form expression
cf2 <- closed_form(~cf + 3 * d)

cf2

# Get the list of symbols, constants are not counted as symbols
cf2$sym

# Get the list of symbol names
cf2$sym_name

# Get the list of symbol types
cf$sym_type

TengMCing/visage documentation built on Aug. 28, 2024, 3:27 p.m.