Learn R Programming

rapsimng (version 0.4.4)

get_parent: Get the parent node from a path

Description

Get the parent node from a path

Usage

get_parent(l, path)

Value

A new list for parent

Arguments

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

Examples

Run this code
wheat <- read_apsimx(system.file("extdata/Wheat.json", package = "rapsimng"))
a <- search_path(wheat, '[Structure].BranchingRate')
get_parent(wheat, a$path)

Run the code above in your browser using DataLab