compile: Compilation of Stan code

View source: R/PMXStanModel.R

compileR Documentation

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.

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.

Value

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

See Also

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

Examples


m <- PMXStanModel(path = tempfile("pk_m1"))
compile(m)

m$compile.stanmodel()

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


stanette documentation built on May 11, 2022, 5:11 p.m.

Related to compile in stanette...