Skip to contents

Serializes the Julia object contained in an rjuliabugs object and saves the entire object as an .rds file. The Julia object is saved separately using Julia's Serialization.serialize. The file path can be passed manually, or retrieved from the chains_file slot in the object.

Usage

save_rjuliabugs(rjuliabugs_model, file, chains_file = NULL)

Arguments

rjuliabugs_model

An object of class rjuliabugs, containing at least the fields name (Julia object name as a string) and chains_file.

file

A character string giving the base name or path for saving the .rds file. If the extension .rds is missing, it will be appended automatically.

chains_file

Optional character string giving the path where the Julia object should be serialized. The file name should have the .jls extension. If NULL, uses the chains_file field from rjuliabugs_model.

Value

Returns invisible(NULL). Used saving both the Julia object and the R rjuliabugs object to disk.

Examples

if (FALSE) { # \dontrun{
save_rjuliabugs(my_model, file = "my_model", chains_file = "chains.jls")
} # }