qm_is_cluster: Validate cluster object

View source: R/qm_is_cluster.R

qm_is_clusterR Documentation

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)

Arguments

obj

Object to test

verbose

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

Value

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

See Also

qm_combine, qm_summarize

Examples

# 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)


qualmap documentation built on June 22, 2024, 12:25 p.m.