| get_bodies | R Documentation |
Returns the bodies in an 'orbit_system' as a standalone tibble. Useful when you want to inspect, filter, or save the body states without dealing with the full system object.
get_bodies(system)
system |
An 'orbit_system' object. |
A tibble with columns 'id', 'mass', 'x', 'y', 'z', 'vx', 'vy', 'vz'.
sys <- create_system() |>
add_sun() |>
add_planet("Earth", parent = "Sun") |>
add_planet("Mars", parent = "Sun")
# Get the tibble
get_bodies(sys)
# Use with dplyr
get_bodies(sys) |>
dplyr::filter(mass > 1e24)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.