R/zzz.R

Defines functions .onLoad

.onLoad <- function(libname, pkgname) {
  # Seed tarpolyglot.julia_home from the JULIA_HOME env var if set, so users can point JuliaCall at a specific Julia without editing package code. Leaving it NULL falls back to JuliaCall's own discovery (works once Julia is on PATH).
  op <- options()
  defaults <- list(
    tarpolyglot.julia_home = {
      jh <- Sys.getenv("JULIA_HOME", unset = "")
      if (nzchar(jh)) jh else NULL
    }
  )
  toset <- !(names(defaults) %in% names(op))
  if (any(toset)) {
    options(defaults[toset])
  }
  invisible()
}

Try the tarpolyglot package in your browser

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

tarpolyglot documentation built on Nov. 22, 2026, 5:07 p.m.