calcGaps: Calculate optimal number of clusters

View source: R/calcGaps.R

calcGapsR Documentation

Calculate optimal number of clusters

Description

Calculate the gap statistic for a series of k-means clusterings using the SAGx package. Use the number of clusters with the highest gap statistic for your clustering analysis.

Usage

calcGaps(resList, maxClus = 10, iter = 10)

Arguments

resList

List of results data frames

maxClus

Maximum number of clusters to test, minimum 3. Default 10. NOTE: The more, the longer it takes.

iter

Number of bootstrapping iterations for calculating gap statistic. Default 10. NOTE: the more, the longer it takes.

Value

A vector of length 2 containing the maximum gap statistic and the optimal number of k-means clusters, respectively.


kevincjnixon/BinfTools documentation built on July 10, 2024, 11:46 a.m.