Package 'odin.js'

Title: 'odin' 'JavaScript' support
Description: Create 'JavaScript' differential equation models from an 'odin' model specification.
Authors: Rich FitzJohn
Maintainer: Rich FitzJohn <[email protected]>
License: MIT + file LICENSE
Version: 0.1.11
Built: 2024-09-21 02:51:49 UTC
Source: https://github.com/mrc-ide/odin.js

Help Index


Create a javascript odin model

Description

Generate a javascript odin model from a file, text string or expression.

Usage

odin_js(x, ..., options = NULL)

odin_js_(x, ..., options = NULL)

Arguments

x

Either the name of a file to read, a text string (if length is greater than 1 elements will be joined with newlines) or an expression.

...

Arguments passed to odin_options

options

An optional odin_options object. The target element (if present) will be overriden.


Create a bundle of odin models

Description

Create a bundle of odin models

Usage

odin_js_bundle(
  filenames,
  dest = tempfile(),
  include = NULL,
  include_dopri = TRUE
)

Arguments

filenames

Filenames with odin source code

dest

Destination file for the generated javascript

include

Optional vector of paths of filenames to include into the javascript bundle

include_dopri

Logical, indicating if the dopri solver should be included as well.


Generate a built in example

Description

Generate a web page and javascript for a built-in example

Usage

odin_js_example(filename, name, dest = tempfile())

Arguments

filename

Filename of model to include

name

Name of the example (only simple is currently supported)

dest

Destination directory - multiple files will be created here, overwriting existing files without prompting.