qm_combine: Combine objects

Description Usage Arguments Value See Also Examples

View source: R/qm_combine.R

Description

A wrapper around dplyr::bind_rows for combining cluster objects created with qm_create into a single tibble. Input data for qm_combine are validated using qm_is_cluster as part of the cluster object creation process.

Usage

1

Arguments

...

A list of cluster objects to be combined.

Value

A single tibble with all observations from the listed cluster objects. This tibble is stored with a custom class of qm_cluster to facilitate data validation.

See Also

qm_create, qm_is_cluster

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# load and format reference data
stl <- stLouis
stl <- dplyr::mutate(stl, TRACTCE = as.numeric(TRACTCE))

# create clusters
cluster1 <- qm_define(118600, 119101, 119300)
cluster2 <- qm_define(119300, 121200, 121100)

# create cluster objects
cluster_obj1 <- qm_create(ref = stl, key = TRACTCE, value = cluster1,
    rid = 1, cid = 1, category = "positive")
cluster_obj2 <- qm_create(ref = stl, key = TRACTCE, value = cluster2,
    rid = 1, cid = 2, category = "positive")

# combine cluster objects
clusters <- qm_combine(cluster_obj1, cluster_obj2)

qualmap documentation built on July 8, 2020, 5:48 p.m.