| export_bodies | R Documentation |
Writes the body table (id, mass, position, and velocity) from an 'orbit_system' to a CSV file. This is useful for sharing initial conditions with collaborators or loading them into other tools like Python or Excel.
export_bodies(system, path)
system |
An 'orbit_system' object. |
path |
File path to save to. Should end in '.csv'. |
'system', invisibly.
sys <- create_system() |>
add_sun() |>
add_planet("Earth", parent = "Sun") |>
add_planet("Mars", parent = "Sun")
export_bodies(sys, file.path(tempdir(), "bodies.csv"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.