Learn R Programming

odin (version 1.2.6)

odin_ir_deserialise: 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)

Value

A named list

Arguments

x

An intermediate representation as a json string

See Also

odin_parse

Examples

Run this code
# 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)

Run the code above in your browser using DataLab