glue_formula: Create formulas using 'glue' syntax

View source: R/formula_tools.R

glue_formulaR Documentation

Create formulas using glue syntax

Description

This function is specifically designed for dynamically evaluating formulas with time indices. As such, it will delete any formula elements referring to times less than 0.

Usage

glue_formula(string, ...)

Arguments

string

chr. Expressions enclosed in braces will be evaluated as R code (see ?glue).

...

additional arguments. Here you can pass variables to be evaluated in enclosed expressions in string.

Examples


glue_formula('~L{t}*L{t-1}+L{t-2}', t=2)
glue_formula('~L{t}*L{t-1}+L{t-2}', t=1)


audreyrenson/didgformula documentation built on Oct. 9, 2022, 11:45 a.m.