This method loads a simulation from the disk.
-Examples
-# create a simulation having name "recover_simulation_test" and
-# save its snapshots in a local directory
-sim <- new(Simulation, "recover_simulation_test",
- save_snapshots=TRUE)
-
-# add the species of "A"
-sim$add_mutant("A",
- epigenetic_rates=c("+-" = 0.01, "-+"=0.01),
- growth_rates = c("+"=0.1, "-"=0.01),
- death_rates = c("+"=0.05, "-"=0.005))
-
-# place a cell in the tissue
-sim$place_cell("A+", 500, 500)
-
-# simulate up to time 50
-sim$run_up_to_time(50)
-#>
[████████████████████████████████████████] 100% [00m:00s] Saving snapshot
-
-# show the simulation
-sim
-#> ── rRACES D S M recover_simulation_test ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ▣ A tissue [1000x1000] ⏱ 57.1 ──
-#>
-#> ── Species: 2, with epigenetics
-#>
-#> ======= ==== ===== ==== ====== ===
-#> species λ δ ε counts %
-#> ======= ==== ===== ==== ====== ===
-#> A- 0.01 0.005 0.01 3 60
-#> A+ 0.10 0.050 0.01 2 40
-#> ======= ==== ===== ==== ====== ===
-#>
-#> ── Firings: 34 total
-#>
-#> Species [A-]: 2 (deaths), 3 (duplications) and 1 (switches)
-#> Species [A+]: 11 (deaths), 14 (duplications) and 3 (switches)
-#> ✖ The simulation has no samples yet!
-
-# remove the object sim from the environment
-rm(list=c("sim"))
-
-# the object pointed by sim does not exist any more
-exists("sim")
-#> [1] FALSE
-
-# recover the simulation from the directory "recover_simulation_test"
-sim <- recover_simulation("recover_simulation_test")
-
-sim
-#> ── rRACES D S M recover_simulation_test ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ▣ A tissue [1000x1000] ⏱ 57.1 ──
-#>
-#> ── Species: 2, with epigenetics
-#>
-#> ======= ==== ===== ==== ====== ===
-#> species λ δ ε counts %
-#> ======= ==== ===== ==== ====== ===
-#> A- 0.01 0.005 0.01 3 60
-#> A+ 0.10 0.050 0.01 2 40
-#> ======= ==== ===== ==== ====== ===
-#>
-#> ── Firings: 34 total
-#>
-#> Species [A-]: 2 (deaths), 3 (duplications) and 1 (switches)
-#> Species [A+]: 11 (deaths), 14 (duplications) and 3 (switches)
-#> ✖ The simulation has no samples yet!
-
-# delete dump directory
-unlink("recover_simulation_test", recursive = TRUE)
-