circuitscaper (development version)
Bug fixes
-
cs_setup()now finds Julia whereverJuliaCall::julia_setup()would, instead of only on the PATH. Previously, a Julia installed bycs_install_julia()(whichJuliaCall::install_julia()places outside the PATH) was not found in later sessions, socs_setup()failed with “Julia not found” untiljulia_homewas given explicitly. The same applied to Julia installed via juliaup or Homebrew when R was started from the macOS GUI, whose PATH lacks the shell’s.cs_install_julia(),cs_julia_available(), and the startup message use the same search. -
os_run(parallelize = TRUE)now checks the running Julia session before calling Omniscape, and warns and runs serially if it cannot run in parallel: if Julia has only one thread, or if it was started with an interactive thread (e.g.JULIA_NUM_THREADS = "4"rather than"4,0"), which makes Omniscape releases before 0.6.3 fail with a BoundsError. This can happen when Julia is started outsidecs_setup(), for example by callingJuliaCall::julia_setup()directly. -
cs_setup()now records the number of threads Julia actually has, and warns whenthreadscannot take effect because Julia was already running (including when started outside circuitscaper). Previously it recorded the requested count, andos_run(parallelize = TRUE)could reset the record to 1 when it started Julia. -
os_run()now stops with a clear error if the resistance or conductance surface contains zero or negative values, which Omniscape rejects without writing outputs. Previously this surfaced as an obscure failure to read Omniscape’s output.
circuitscaper 0.1.1
CRAN release: 2026-10-01
New features
- New
os_condition()constructor givesos_run()full access to Omniscape’s conditional connectivity (#2):-
"within"comparisons with user-specified bounds (lower,upper). - Present-vs-future comparisons (
future), in which sources’ present-day values are compared against targets’ future values, as in climate-tracking connectivity analyses. - Two simultaneous conditions, by passing a list of two
os_condition()objects.
-
-
os_run()now warns when a condition layer has missing values at source cells, which Omniscape does not filter. - All
cs_*()functions andos_run()now warn if the installed Circuitscape.jl or Omniscape.jl does not recognize a configuration option written by circuitscaper, rather than letting the option silently have no effect.
Bug fixes
- In 0.1.0,
os_run()’scondition_typeargument was written to the Omniscape configuration under a key Omniscape does not recognize, so it was silently ignored. All conditional analyses instead used Omniscape’s defaults,"within"with bounds of 0 and 0: a source was connected to a target only if its condition value exactly equaled the median value of the target block. This was neither the documented behavior (an unbounded range) nor the requested"equal"comparison. Results from 0.1.0 that usedconditionshould be rerun. - In 0.1.0,
four_neighbors = TRUEwas written to the Circuitscape configuration under an unrecognized key and silently ignored incs_pairwise(),cs_one_to_all(),cs_all_to_one(), andcs_advanced(); all analyses used 8-neighbor connectivity. Results from 0.1.0 that usedfour_neighbors = TRUEshould be rerun.
Breaking changes and deprecations
- Passing a raster directly as
os_run(condition = )is now shorthand foros_condition(x, type = "equal"). Useos_condition()for"within"comparisons, which now require explicit bounds. -
os_run()’scondition_typeargument is deprecated.condition_type = "equal"still works with a warning;condition_type = "within"now errors, since it has no way to specify bounds.
