install_julia_env: Install, update, or remove Julia environment

View source: R/julia_setup.R

install_julia_envR Documentation

Install, update, or remove Julia environment

Description

Instantiate the Julia environment for sdbuildR to run stock-and-flow models using Julia. For more guidance, please see this vignette.

Usage

install_julia_env(remove = FALSE)

Arguments

remove

If TRUE, remove Julia environment for sdbuildR. This will delete the Manifest.toml file, as well as the SystemDynamicsBuildR.jl package. All other Julia packages remain untouched.

Details

install_julia_env() will:

  • Start a Julia session

  • Activate a Julia environment using sdbuildR's Project.toml

  • Install SystemDynamicsBuildR.jl from GitHub (https://github.com/KCEvers/SystemDynamicsBuildR.jl)

  • Install all other required Julia packages

  • Create Manifest.toml

  • Precompile packages for faster subsequent loading

  • Stop the Julia session

Note that this may take 10-25 minutes the first time as Julia downloads and compiles packages.

Value

Invisibly returns NULL after instantiating the Julia environment.

See Also

use_julia(), julia_status()

Examples


## Not run: 
  install_julia_env()

  # Remove Julia environment
  install_julia_env(remove = TRUE)

## End(Not run)


sdbuildR documentation built on Nov. 19, 2025, 5:07 p.m.