parse_equation: Create and parse a model equation

Description Usage Arguments Value Examples

View source: R/parse_equation.R

Description

Create and parse a model equation

Usage

1
parse_equation(equation, envir)

Arguments

equation

A text defining the equation.

envir

A named list with the indexes for the array.

Value

An expression with the code to evaluate the equation.

Examples

1
2
3
4
5
6
7
8
equation <- list(
equation = "y[c] = x[c]^2",
indexes = "c in C"
)

C <- c("sec1", "sec2", "sec3")

parse_equation(equation, envir = globalenv())

paulofelipe/emr documentation built on July 23, 2021, 7:31 p.m.