kmeans.fraction {OutSeekR} | R Documentation |
k-means fraction
Description
Given a vector of cluster assigments from quantify.outliers()
run with method = 'kmeans'
, compute the fraction of observations belonging to the smaller of the two clusters.
Usage
kmeans.fraction(x)
Arguments
x |
A numeric vector. |
Details
This function only considers clusters 1 and 2 even if quantify.outliers()
was run with exclude.zero = TRUE
. In that case, zeros are effectively excluded from the counts used to define the k-means fraction. See examples.
Value
A number.
Examples
x <- c(1, 1, 2, 2, 2, 2, 2, 2, 2, 2);
names(x) <- letters[1:length(x)];
kmeans.fraction(x);
[Package OutSeekR version 1.0.0 Index]