R/zzz.R

Defines functions .onAttach .onLoad

# Package-level environment for storing Julia state
.cs_env <- new.env(parent = emptyenv())

.onLoad <- function(libname, pkgname) {
  .cs_env$julia_ready <- FALSE
  .cs_env$loaded_packages <- character(0)
  .cs_env$julia_threads <- 1L
}

.onAttach <- function(libname, pkgname) {
  if (interactive() && nchar(Sys.which("julia")) == 0) {
    packageStartupMessage(
      "Welcome to circuitscaper! Julia was not detected on your system.\n",
      "Run cs_install_julia() to install Julia and required packages."
    )
  }
}

Try the circuitscaper package in your browser

Any scripts or data that you put into this service are public.

circuitscaper documentation built on April 9, 2026, 5:09 p.m.