clustering {clue}R Documentation

Partitions and Hierarchies

Description

Determine whether an R object represents a partition or hierarchy of objects.

Usage

is.cl_partition(x)
is.cl_hard_partition(x)
is.cl_soft_partition(x)
is.cl_hierarchy(x)

Arguments

x an R object.

Details

Apart from is.cl_soft_partition, these functions are generic functions.

The methods provided in package clue handle the partitions and hierarchies obtained from clustering functions in the base R distribution, as well as packages cclust, cluster, e1071, and mclust (and of course, clue itself).

is.cl_soft_partition gives true iff is.cl_partition is true and is.cl_hard_partition is false.

Value

A logical indicating whether the given object represents a clustering of objects of the respective kind.

Examples

data("Cassini")
pcl <- kmeans(Cassini$x, 3)
is.cl_partition(pcl)
is.cl_hard_partition(pcl)
is.cl_soft_partition(pcl)

hcl <- hclust(dist(USArrests))
is.cl_partition(hcl)
is.cl_hierarchy(hcl)

[Package clue version 0.1-0 Index]