Column names on heatmap

I have created a heatmap of some data, and only the column names are appearing, i was wondering if there was any way to insert row names as well. It is a heatmap of a correlation table so the row names are the same as the column names

Thanks for the help

#Load data
data <- read_excel('finaldata.xlsx')
# create a data martix
matrix_data <- data.matrix(data)
# create heatmap
data_heatmap <- heatmap(matrix_data[ ,c(2:32)])

LINK TO THE DATA -> https://drive.google.com/file/d/1TsVzCl9tc3rjuR_hGHa6KS_6G3e4dAhQ/view?usp=sharing

Hi!
You can just specify the row names of matrix_data.
I'd assume something like rownames(matrix_data)<-colnames(matrix_data[,2:32]) before creating the heatmap should do it.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.