library(FishMap)

Execute main.R with timer, seed and data storage

Make sure you have the two following environment variables in your .Renviron file :

  • FISHMAP_OUTPUT_DIR : path to the directory to store the model output, it will be created if it does not exist

  • FISHMAP_UPDATE_OUTPUTS : logical, enable outputs to be saved if sets to TRUE

To update your .Renviron file, you can run the usethis::edit_r_environ() command which will directly open the file in edit mode. Once your changes saved, you will need to restart your R session.

FISHMAP_OUTPUT_DIR="~/shared/outputs_fishmap"
FISHMAP_UPDATE_OUTPUTS=TRUE

To execute main.R and store its output, execute the following command. This script will execute main.R with a seed to secure reproducibility, it will report time of execution per step and store the data in the folder specified by the environment variable.

source(here::here("dev","run_main_and_save_output.R"))