Displaying 2 results from an estimated 2 matches for "randmat".
Did you mean:
landmat
2013 Feb 20
1
Problem with levelplot() in a loop
...get heatmap to
procude a nice index like levelplot() does?
ps- To see the output with heatmap in a loop, just uncomment the heatmap()
line and comment out the levelplot() line
col.l <- colorRampPalette(c('blue', 'green', 'yellow', 'red'))(30)
for (i in 1:10)
{
randmat <- cbind(rnorm(100),rnorm(100),rnorm(100),rnorm(100),rnorm(100))
colnames(randmat) <- c('A','B','C','D','E')
cormat <- cor(randmat)
levelplot(cormat,xlab=NULL,ylab=NULL,main='Correlation Heat
Map',col.regions=col.l)
# heatmap(cormat,co...
2010 Jan 26
2
heatmap.2 color range
...different values in my
matrix. For example:
If x > 5 , use orange gradient
if x < 1.5, use red gradient
.....
Right now I have the following:
orgPal<-brewer.pal(3,"Oranges")
bluPal<-brewer.pal(3,"Blues")
redPal<-brewer.pal(3,"Reds")
grad <- ifelse(randMat > 5,orgPal,ifelse(randMat<1.5,redPal,bluPal))
hmap <- heatmap(randMat,Rowv=NULL, Colv=NULL,dendrogram="none",col = grad,
scale="column",...)
the problem is that all the colors become very close to white on one end of
the spectrum and the orange colors, for example, sta...