Re: [R] heatmap color specification

2007-02-12 Thread Xiaohui
Jim Lemon wrote: Xiaohui wrote: ... Then, I did a heatmap for 'test' matrix. But for now, I want to specify each of the cell in the heatmap according to the values of the corresponding matrix elements of test. Let's say: col-c(red,yellow,green) for test[1,1], the color on the map should

Re: [R] heatmap color specification

2007-02-10 Thread Jim Lemon
Xiaohui wrote: ... Then, I did a heatmap for 'test' matrix. But for now, I want to specify each of the cell in the heatmap according to the values of the corresponding matrix elements of test. Let's say: col-c(red,yellow,green) for test[1,1], the color on the map should be red. I

[R] heatmap color specification

2007-02-09 Thread Xiaohui
hi, I have a positive integer matrix like: test-matrix(c(1,2,2,2,2,1,1,2,3),3) and based on the distant function I made like this: generateDistMat-function (target) { n - nrow(target) rn - rownames(target) distM - matrix(NA, n, n) diag(distM) - 0 for (i in 1:(n - 1)) for (j

[R] Heatmap color specification

2007-02-09 Thread Xiaohui
hi, I have a positive integer matrix like: test-matrix(c(1,2,2,2,2,1,1,2,3),3) and based on the distant function I made like this: generateDistMat-function (target) { n - nrow(target) rn - rownames(target) distM - matrix(NA, n, n) diag(distM) - 0 for (i in 1:(n - 1)) for (j in