Displaying 1 result from an estimated 1 matches for "tp956968p957059".
2009 Dec 10
3
heatmap/image from csv data
Hi all,
I'm trying to use heat.map to display some data.
The data is originally in csv format and when I read it in R using
read.table I get:
a b c d e
1 A 1 1 1 1
2 B 1 0 1 1
3 C 0 1 0 1
4 D 1 1 1 0
5 E 1 0 0 0
The problem is, that for heatmap I need a numerical matrix. When using
data.matrix I get:
a b c d e
[1,] 1 1 1 1 1
[2,] 2 1 0 1 1
[3,] 3 0 1 0 1
[4,] 4 1 1 1 0
[5,] 5 1 0 0 0
So