Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rxTrans

Translate the model to C code if needed


Description

This function translates the model to C code, if needed

Usage

rxTrans(
  model,
  modelPrefix = "",
  md5 = "",
  modName = NULL,
  modVars = FALSE,
  ...
)

## Default S3 method:
rxTrans(
  model,
  modelPrefix = "",
  md5 = "",
  modName = NULL,
  modVars = FALSE,
  ...
)

## S3 method for class 'character'
rxTrans(
  model,
  modelPrefix = "",
  md5 = "",
  modName = NULL,
  modVars = FALSE,
  ...
)

Arguments

model

This is the ODE model specification. It can be:

  • a string containing the set of ordinary differential equations (ODE) and other expressions defining the changes in the dynamic system.

  • a file name where the ODE system equation is contained

An ODE expression enclosed in \{\}

(see also the filename argument). For details, see the sections “Details” and RxODE Syntax below.

modelPrefix

Prefix of the model functions that will be compiled to make sure that multiple RxODE objects can coexist in the same R session.

md5

Is the md5 of the model before parsing, and is used to embed the md5 into DLL, and then provide for functions like rxModelVars().

modName

a string to be used as the model name. This string is used for naming various aspects of the computations, including generating C symbol names, dynamic libraries, etc. Therefore, it is necessary that modName consists of simple ASCII alphanumeric characters starting with a letter.

modVars

returns the model variables instead of the named vector of translated properties.

...

Ignored parameters.

Value

a named vector of translated model properties including what type of jacobian is specified, the C function prefixes, as well as the C functions names to be called through the compiled model.

Author(s)

Matthew L.Fidler

See Also


RxODE

Facilities for Simulating from ODE-Based Models

v1.0.9
GPL (>= 3)
Authors
Matthew L. Fidler [aut] (<https://orcid.org/0000-0001-8538-6691>), Melissa Hallow [aut], Wenping Wang [aut, cre], Zufar Mulyukov [ctb], Alan Hindmarsh [ctb], Awad H. Al-Mohy [ctb], Matt Dowle [ctb], Cleve Moler [ctb], David Cooley [ctb], Drew Schmidt [ctb], Arun Srinivasan [ctb], Ernst Hairer [ctb], Gerhard Wanner [ctb], Goro Fuji [ctb], Hadley Wickham [ctb], Jack Dongarra [ctb], Linda Petzold [ctb], Martin Maechler [ctb], Matteo Fasiolo [ctb], Morwenn [ctb], Nicholas J. Higham [ctb], Roger B. Sidje [ctb], Simon Frost [ctb], Kevin Ushey [ctb], Yu Feng [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.