Skip to contents

Immediate parent-child table between two levels

Usage

geo_family(x, parent = NULL, child = NULL)

Arguments

x

A Geoscale.

parent, child

Level names. Defaults to every adjacent pair in x@levels.

Value

A data.frame with columns parent_level, parent, child_level, child. Atoms unassigned at either level are omitted.

Examples

gs <- geoscale_example()
geo_family(gs, "state", "zone")
#>   parent_level parent child_level child
#> 1        state     N1        zone    N1
#> 2        state     N2        zone    ZB
#> 3        state     S1        zone    ZB
#> 4        state     S1        zone    ZC