qm_is_cluster {qualmap} | R 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 |
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)
[Package qualmap version 0.2.2 Index]