Reputation: 11
here is my script:
heatmap.2(
as.matrix(data[,2:7]),
trace="none",
dendrogram="row",
cexRow=0.5, cexCol=0.95,
)
The gene names appear as numbers as I excluded the first column that contains gene names. How can I replace the numbering by gene names?
Many thanks
Upvotes: 0
Views: 1777
Reputation: 44
if you have a matrix object (named m) and a vector of genes (named g), you can add row names like this:
rownames(m) <- g
you can similarly add the names of columns:
colnames(m) <- vector
then you can re-plot the heatmap of matrix m
Hope this helps. Cheers!
Upvotes: 1