qualmap (version 0.2.2)

qm_is_cluster: Validate cluster object

Description

This function tests to see whether an object contains the characteristics of an object created by qm_cluster. It is used as part of the qm_combine and qm_summarize functions, and is exported so that it can be used interactively as well.

Usage

qm_is_cluster(obj, verbose = FALSE)

Value

A logical scalar that is TRUE if the given object contains the approprite characteristics; if it does not, FALSE is returned.

Arguments

obj

Object to test

verbose

A logical scalar; if TRUE, a tibble with test results is returned

See Also

qm_combine, qm_summarize

Examples

Run this code
# load and format reference data
stl <- stLouis
stl <- dplyr::mutate(stl, TRACTCE = as.numeric(TRACTCE))

# create cluster
cluster <- qm_define(118600, 119101, 119300)

# create simple cluster object
cluster_obj <- qm_create(ref = stl, key = TRACTCE, value = cluster,
    rid = 1, cid = 1, category = "positive")

# test cluster object
qm_is_cluster(cluster_obj)
qm_is_cluster(cluster_obj, verbose = TRUE)

Run the code above in your browser using DataLab