HI All,
I'm fairly in new with R, so any help is much appreciated. I'm in the process of making a heatmap using the pheatmap function. I'm adding a column color bar so that I can associate specific data in the header with specific colors in the color bar. So for example I want anything that contains the number 1 in the header of my entire data set to be labeled as Male and have a specific color associated with it in the column color bar.
I'm using the following code as an example to try to do this:
require(pheatmap)
# dummy data
dummymat = matrix(rnorm(100), 10, 10)
colnames(dummymat) = paste("Patient", 1:10, sep = "")
rownames(dummymat) = paste("Gene", 1:10, sep = "")
# create a data frame with the patients categories
categories