odin_ir_deserialise: Deserialise odin's IR

Description Usage Arguments Value See Also Examples

View source: R/ir_deserialise.R

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

1

Arguments

x

An intermediate representation as a json string

Value

A named list

See Also

odin_parse

Examples

1
2
3
4
5
6
7
# 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)

richfitz/odin documentation built on July 21, 2020, 7:43 p.m.