Hi, I am new to WGCNA and I am trying to plot a dendogram using WGCNA package in R.
plotDendroAndColors(sampleTree2, traitColors, > groupLabels = names(datTraits), > main = "Sample dendrogram and trait heatmap")
This is the error I get:
Error in plotOrderedColors(dendro$order, colors = colors, rowLabels = rowLabels, : ERROR: length of colors vector not compatible with number of objects in 'order'.
Any ideas on how to resolve this? Many thanks!