gaz_relations {mregions2} | R Documentation |
Walk the hierarchy of the MarineRegions Gazetter given a Gazetteer MRGID or Gazetteer entries
Description
Walk the hierarchy of the MarineRegions Gazetter given a Gazetteer MRGID or Gazetteer entries
Usage
gaz_relations(x, ...)
## S3 method for class 'numeric'
gaz_relations(x, ...)
## S3 method for class 'mr_df'
gaz_relations(x, ...)
Arguments
x |
the object from which the relations are retrieved. Can be:
|
... |
Arguments passed on to
|
Details
You can pass the output of most gaz_*
functions to gaz_relations()
to retrieve the
related gazetteer entries
Developer info
This is done in the method gaz_relations.mr_df()
. mr_df
is a class defined in
this package to ensure the data frame passed to gaz_relations has a variable with MRGID.
Value
A data frame with Gazetteer entries
Examples
# Get the relations of the Belgian Exclusive Economic Zone
gaz_search("Belgian Exclusive Economic Zone") |> gaz_relations()
# Or using its mrgid
gaz_relations(3293)