get_parent {rapsimng} | R Documentation |
Get the parent node from a path
get_parent(l, path)
l |
the list of apsimx file |
path |
If numeric, the path returned by search_path or search_node. If character, the path supported by apsimx |
A new list for parent
wheat <- read_apsimx(system.file("extdata/Wheat.json", package = "rapsimng"))
a <- search_path(wheat, '[Structure].BranchingRate')
get_parent(wheat, a$path)