These are functions that assign objects to variable names in Julia.

set_seed(.seed = 123L)

set_map(.x)

set_threads(.threads)

set_states_init(.xinit, .state)

set_model_move(.model_move)

set_timeline(.timeline)

set_path()

set_model_obs_types(.model_obs)

set_model_obs(.model_obs)

set_model_obs_pars(.model_obs_pars)

set_yobs_via_sim()

set_datasets(.datasets)

set_yobs_via_datasets(.datasets, .model_obs)

set_pf_filter(.n_move, .n_resample, .n_record, .direction)

Value

Exported functions return invisible(NULL).

Details

The following functions are exported:

  • set_seed() sets a seed in both R and Julia.

    • It is often a good idea to call set_seed() at the start of your workflow.

  • set_map() exports a SpatRaster map of the study area to a variable named env in Julia (see ModelMove).

    • Export the map at the start of your workflow.

Other functions are internal.

Author

Edward Lavender

Examples

if (julia_run()) {

  # Connect to Julia
  julia_connect()

  # Set the seed in `R` and `Julia`
  set_seed(1)

  # Define a map of the study area & export
  # > This map defines the region(s) within which movements are allowed
  # > `set_map()` makes it available to `Julia` routines (see ?`ModelMove`)
  map <- dat_gebco()
  terra::plot(map)
  set_map(map)

}
#> `patter::julia_connect()` called @ 2024-08-01 11:41:14... 
#> ... Running `Julia` setup via `JuliaCall::julia_setup()`... 
#> ... Validating Julia installation... 
#> ... Setting up Julia project... 
#> ... Handling dependencies... 
#> Warning: `JULIA_NUM_THREADS` could not be set via `.threads`.
#> ... `Julia` set up with 8 thread(s). 
#> `patter::julia_connect()` call ended @ 2024-08-01 11:41:20 (duration: ~6 sec(s)).