scclust {scclust} | R Documentation |
Constructor for scclust objects
Description
The scclust
function constructs a scclust
object from existing
cluster labels.
Usage
scclust(cluster_labels, unassigned_labels = NULL, ids = NULL)
Arguments
cluster_labels |
a vector containing each data point's cluster label. |
unassigned_labels |
labels that denote unassigned data points. If |
ids |
IDs of the data points. Should be a vector of the same length as
|
Details
scclust
does not derive clusters from sets of data points; see
sc_clustering
and hierarchical_clustering
for
that functionality.
Value
Returns a scclust
object with the clustering described by the
provided labels.
Examples
# 10 data points in 3 clusters
my_scclust1 <- scclust(c("A", "A", "B", "C", "B",
"C", "C", "A", "B", "B"))
# 8 data points in 3 clusters, 2 points unassigned
my_scclust2 <- scclust(c(1, 1, 2, 3, 2,
NA, 3, 1, NA, 2))
# Custom labels indicating unassiged points
my_scclust3 <- scclust(c("A", "A", "B", "C", "NONE",
"C", "C", "NONE", "B", "B"),
unassigned_labels = "NONE")
# Two different labels indicating unassiged points
my_scclust4 <- scclust(c("A", "A", "B", "C", "NONE",
"C", "C", "0", "B", "B"),
unassigned_labels = c("NONE", "0"))
# Custom data point IDs
my_labels5 <- scclust(c("A", "A", "B", "C", "B",
"C", "C", "A", "B", "B"),
ids = letters[1:10])
[Package scclust version 0.2.4 Index]