Recursive function for finding all parents of child location

listParents(loc_code = NULL, parent_child = NULL)

Arguments

loc_code

Code of child location, contained in `parent_child`

parent_child

dataframe with at least `parent` and `child` columns. Can be created with `buildParentChild()` function.

Value

character vector of all sites leading to `loc_code` site.

Author

Kevin See

Examples

listParents()
#> Error in listParents(): !is.null(loc_code) is not TRUE