Learn R Programming

stanette (version 2.21.4)

compile: Compilation of Stan code

Description

Compiles a piece of model-specific Stan code, as part of a PMXStanModel object, into an executable.

Usage

compile(model, stanfilepath = NULL)

Arguments

model

a PMXStanModel object.

stanfilepath

a string for user to specify the path of the Stan code. The default is NULL, and the location of the Stan file to be compiled will be decided by model above.

Value

No explicit return; a successful compilation will generate an executable code as part of the current PMXStanModel object.

Details

This is a generic version of the method compile.stanmodel() for the PMXStanModel class. The compilation step can also be performed simultaneous during the initialization process of a PMXStanModel object, by setting the argument compile = TRUE.

See Also

PMXStanModel for the method compile.stanmodel() and the argument compile.

Examples

Run this code
# NOT RUN {
m <- PMXStanModel(path = tempfile("pk_m1"))
compile(m)

m$compile.stanmodel()

m <- PMXStanModel(path = tempfile("pk_m1"), compile = TRUE)
# }

Run the code above in your browser using DataLab