centers_ca {svs} | R Documentation |
Compute Coordinates for Cluster Centers
Description
A helper function for computing the coordinates of cluster centers (typically used in correspondence analysis).
Usage
centers_ca(x, clusters, freq)
Arguments
x |
A numeric matrix. |
clusters |
A clustering of the row levels of |
freq |
An optional vector of frequency counts for the row levels of |
Value
A matrix containing the coordinates of the cluster centers.
See Also
Examples
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8",
stringsAsFactors = FALSE)
sca_SndT_Fra <- fast_sca(SndT_Fra)
kcl_SndT_Fra <- kmeans(sca_SndT_Fra$pos1, centers = 7)
centers_ca(sca_SndT_Fra$pos1, clusters = kcl_SndT_Fra, freq = freq_ca(SndT_Fra[, 1]))
[Package svs version 3.1.1 Index]