R/scenario_functions.R
flatten_scenario_data.RdWalk a nested scene (Unity-style) and return one row per node with: path, name, pos_x/y/z, eul_x/y/z, and (optionally) depth (root = 0).
flatten_scenario_data(
x,
root_path = "root",
as_tibble = TRUE,
include_depth = TRUE
)A tibble/data.frame with one row per node.
df_nested <- df %>%
ungroup() %>%
mutate(
scenario_data_0_flat = map(
scenario_data_0,
~ flatten_scenario_data(.x)
)
)
#> Error in df %>% ungroup() %>% mutate(scenario_data_0_flat = map(scenario_data_0, ~flatten_scenario_data(.x))): could not find function "%>%"