Given a matrix like:
m <- matrix(ncol = 4, nrow = 3)
colnames(m) <-c("attribute1-1","attribute1-2","attrbute1-3","attribute2")
rownames(m) <-c("sample1","sample2","sample3")
m[1,] <- c(5,7,0,2)
m[2,] <- c(0,0,0,6)
m[3,] <- c(0,0,4,1)
I would like to make a heat map where attributes 1-1 : 1-3 are used to indicate presence/absence (whether that individual entry is blank or not, depending if there is a positive value or 0) and attribute 2 is used to indicate intensity. In other words: if, according to the attribute1 column there is the presence of that row in that instance of attribute 1 (e.g. positive value for attribute1-2 for row1) then the intensity is prescribed by attribute 2.
I think the presence/absence could be done using a formula such as "decostand": X.pa <- decostand(X,method="pa")
And heatmaps can be created from several packages, notably "Superheat".
I can't seem to get anything working, though. Any advice as to how much to continue would be much appreciated. Thank you in advance.