Learn R Programming

tabs (version 0.2.0)

get_groups: get_groups

Description

get groups of interconnected shapes

Usage

get_groups(filename, unnest = TRUE, col = c("recnames", "refnames"))

Value

list with groups of interconnected shapes

Arguments

filename

path where files or qs2/rds was exported, reconstruct object of class tabs or recvect object

unnest

boolean, unnest groups to list all shape names and ids in a column

col

character varying, which column to use to identify groups

Author

Johannes De Groeve

Examples

Run this code
# load data samples
sporades <- sporades()
topo <- sporades$topo
labs <- sporades$labs
correction <- sporades$correction
curve <- sporades$curve

# subset first and last period 
curve <- curve[[c(1,dim(curve)[3])]]

# reconstruct
rec <- reconstruct(topo=topo,
                   region=labs,
                   curve=curve,
                   correction=correction,
                   reclabs='name'
                   )
groups <- get_groups(rec,unnest=FALSE)
ids <- get_groups(rec,unnest=TRUE)

Run the code above in your browser using DataLab