| save_system | R Documentation |
Saves the full 'orbit_system' object (bodies, forces, and time) to an '.rds' file so it can be restored later with [load_system()]. This preserves everything — the gravitational constant, body states, and class — exactly as it was.
save_system(system, path)
system |
An 'orbit_system' object. |
path |
File path to save to. Should end in '.rds'. |
'system', invisibly.
sys <- create_system() |>
add_sun() |>
add_planet("Earth", parent = "Sun")
save_system(sys, file.path(tempdir(), "my_system.rds"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.