compmod: Compile parsed models.

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Compiles the generated C source code of a parsed model using the inline package.

Usage

1
compmod(cout, name = "derivs")

Arguments

cout

A parsed model.

name

A string indicating the name of the compiled function, defaults to "derivs".

Details

Uses the inline package to compile the generated c code.

Value

Returns a compiled function named as the name argument and is included in R's environment automatically, i.e. no assignment is needed. The compiled function has the following form in C:

1
2
double * name ( double * t, double * y, 
                double * fout, double * vthetas) 

Note

We note again that there is no need to assign the return value to a variable. The compmod function loads the compiled function directly to the R's environment.

Author(s)

Vasileios Giagos

See Also

The function parsemod generates the c code for the models. The transition density can be calculated with calcdens and MLEs are obtained with optmod.

Examples

1
2
3
4
5
## Not run: 
##After generating a model "cout"
compmod(cout,"derivs") #no need to assign the return value

## End(Not run)

lnar documentation built on May 2, 2019, 4:51 p.m.