I am getting this strange error while plotting my heatmap which contains the matrix, sampleDistMatrix. sampleDistMatrix is a matrix that contains 28 rows and 1 column. sampleDists contain 28 rows . The following are the screenshot of the values inside sampleDistmatrix and sampleDists respectively.
The code is as follows:
pheatmap(sampleDistMatrix, clustering_distance_rows = sampleDists, clustering_distance_cols = sampleDists, clustering_method = 'ward.D', fontsize = 8, col = colors)
The error that I receive to the following code :
Error in cluster_mat(mat, distance = clustering_distance_rows, method = clustering_method) :
distance has to be a dissimilarity structure as produced by dist or one measure form the list: 'correlation', 'euclidean', 'maximum', 'manhattan', 'canberra', 'binary', 'minkowski'
What is the necessary correction that I need to do in order to plot my heat map successfully?