I have a normalized gene expression data, with 2800 rows and 600 columns. I need to find the number of clusters, I am trying to use NbClust
function to calculate the number of clusters using different methods and to use majority rule to choose the number which occurs the most. But I get the following error:
library(NbClust)
nb <- NbClust(ranked.expr, distance = NULL, min.nc = 2,
max.nc = 10, method = "complete", index ="all")
But I am getting the error:
Error in NbClust(ranked.exprs[1:2825, 1:598], distance = NULL, min.nc = 2, :
The TSS matrix is indefinite. There must be too many missing values. The index cannot be calculated.
Any hints what could be the reason and how can I make it to work?