odin_ir: Return detailed information about an odin model

View source: R/interface.R

odin_irR Documentation

Return detailed information about an odin model

Description

Return detailed information about an odin model. This is the mechanism through which coef works with odin.

Usage

odin_ir(x, parsed = FALSE)

Arguments

x

An odin_generator function, as created by odin::odin

parsed

Logical, indicating if the representation should be parsed and converted into an R object. If FALSE we return a json string.

Warning

The returned data is subject to change for a few versions while I work out how we'll use it.

Examples

exp_decay <- odin::odin({
  deriv(y) <- -0.5 * y
  initial(y) <- 1
}, target = "r")
odin::odin_ir(exp_decay)
coef(exp_decay)

odin documentation built on Sept. 30, 2024, 9:34 a.m.