
Load an rjuliabugs
Object and Restore the Julia State
load_rjuliabugs.Rd
Loads an object of class rjuliabugs
from an .rds
file and restores the
corresponding Julia sampler object using Julia’s Serialization.deserialize
.
The path linking the Chains
object from Julia
is defined in the when the
function save_rjuliabugs()
is called.
Value
An object of class rjuliabugs
, with the Julia sampler object loaded into the current session.
If the name was changed to avoid conflict, the returned object reflects the updated name.
Details
If the original sampler name (name
) already exists in the active Julia session,
a new unique name is generated to avoid overwriting it. A warning will be issued
to indicate that the name has changed.
The .rds
file must contain a valid rjuliabugs
object with both the name
and chains_file
fields defined.
The function checks if the sampler name is already defined in Julia. If so, a unique name is generated
using check_sampler_is_defined
, and the Julia object is loaded under that name.