[R] help with heatmap - how to remove annoying "X" before numeric values?
Gabor Grothendieck
ggrothendieck at gmail.com
Thu Jul 19 04:05:58 CEST 2007
read.table is doing that, not heatmap.2. Use
read.table("temp.txt", header = TRUE, check.names = FALSE)
On 7/18/07, Suzanne Matthews <suzanne.j.matthews at gmail.com> wrote:
> Hello All,
>
> I have a simple question based on how things are labeled on my heat map;
> particularly, there is this annoying "X" that appears before the numeric
> value of all the labels of my columns.
>
> Let's say I have the following silly data, stored in "temp.txt"
> 1905 1910 1950 1992 2011 2020
> Gnat 0.08 0.29 0.29 0.37 0.39 0.43
> Snake 0.16 0.34 0.32 0.40 0.41 0.53
> Bat 0.40 0.54 0.52 0.60 0.60 0.63
> Cat 0.16 0.27 0.29 0.39 0.37 0.41
> Dog 0.43 0.54 0.52 0.61 0.60 0.62
> Lynx 0.50 0.57 0.54 0.59 0.5 0.59
>
> I use the following commands to generate my heatmap:
> heat <- read.table('temp.txt')
> x <- as.matrix(heat)
>
> heatmap.2(x, keysize=1.2, dendrogram="none", trace="none", Colv = FALSE,
> main = "Silly Data", labCol=
> NULL, margin=c(7,8))
>
> This generates a very nice heatmap, but there is one thing I have an issue
> with: How do I get rid of the 'X' that seems to come automatically before my
> numeric column values? I just want those columns to be labeled 1905, 1910,
> 1950, and so on. I cannot find anything in the heatmap.2 documentation that
> suggests how I should do this.
>
> Thank you very much for your time, and patience in reading this!
>
> Sincerely,
> Suzanne
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list