The data matrix, with samples (observations) in rows and genes (variables)in columns
class
a vector descibing the cluster memberships of the rows of data
B
the number of bootstrap samples
cluster.func
a function taking the arguments data and k (number of clusters) and outputs cluster assignments
as list elements cluster ( accessed by object$cluster ).
Value
The GAP statistic and the standard deviation
References
Tishirani, R., Walther, G. and Hastie, T. (2000) Estimating the number of clusters in a dataset
via the Gap statistic. Technical Report Stanford