odin_ir_deserialise: Deserialise odin's IR

View source: R/ir_deserialise.R

odin_ir_deserialiseR Documentation

Deserialise odin's IR

Description

Deserialise odin's intermediate model representation from a json string into an R object. Unlike the json, there is no schema for this representation. This function provides access to the same deserialisation that odin uses internally so may be useful in applications.

Usage

odin_ir_deserialise(x)

Arguments

x

An intermediate representation as a json string

Value

A named list

See Also

odin_parse

Examples

# Parse a model of exponential decay
ir <- odin::odin_parse({
  deriv(y) <- -0.5 * y
  initial(y) <- 1
})
# Convert the representation to an R object
odin::odin_ir_deserialise(ir)

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