Re: [R] heatmap ploting

2021-11-05 Thread Jim Lemon
Hi Steve, That plot looks to me as though a value-to-color transformation is performed on the logarithm of gene expression. The scale bar can be roughly reproduced like this: library(plotrix) plot(0,xlim=c(0,3)) gradient.rect(0,-0.1,3,0.1, col=color.scale(seq(0,3,0.1), c(0.7,1,1,1,0.7,0.2), c(0

Re: [R] Heatmap

2019-10-21 Thread Rui Barradas
Hello, Just do col = rev(heat.colors(256)) ? Hope this helps, Rui Barradas Às 12:55 de 21/10/19, Eleftheria Dalmaris escreveu: Hello all, I have made the attached heat map without a problem. On this heat map, the yellows are my high values and the oranges are my low values. Is there a way t

Re: [R] heatmap.2, adding a legend at bottom

2018-10-04 Thread Ding, Yuan Chun
ot;Legend", xpd=TRUE) David L Carlson Department of Anthropology Texas A&M University College Station, TX 77843-4352 -Original Message- From: R-help On Behalf Of Ding, Yuan Chun Sent: Thursday, October 4, 2018 1:19 PM To: r-help@r-project.org Subject: Re: [R] heatmap

Re: [R] heatmap.2, adding a legend at bottom

2018-10-04 Thread David L Carlson
ot;Legend", xpd=TRUE) David L Carlson Department of Anthropology Texas A&M University College Station, TX 77843-4352 -Original Message- From: R-help On Behalf Of Ding, Yuan Chun Sent: Thursday, October 4, 2018 1:19 PM To: r-help@r-project.org Subject: Re: [R] heatmap.2, adding a

Re: [R] heatmap.2, adding a legend at bottom

2018-10-04 Thread Ding, Yuan Chun
Hi All, I generated the attached heatmap using the following R code and attached testfile. I tried to move the legend to the bottom, Can anyone help me? I have played for 3 hours and can not resolve the problem. I realized that in the last email, I forgot to include the "Group" variable for

Re: [R] Heatmap help

2017-03-05 Thread Patricia J. Hawkins
Hi, you have a couple of things going on here. You can reorder your matrix by creating an index like this: > A_index=c(grep(".A", colnames(A)), grep(".B", colnames(A))) and do this: > heatmap.2(A[,A_index], dendrogram="col", Rowv = colnames(A)[A_index], > tracecol = NA,col=bluered(64

Re: [R] Heatmap help

2017-03-04 Thread André Luis Neves
Thanks, Patricia! I will do it by the rows, and your explanations were great and easy to follow! Thank you very much for your help and time. Andre On Mar 4, 2017 4:18 PM, "Patricia J. Hawkins" wrote: Hi, you have a couple of things going on here. You can reorder your matrix by creating an ind

Re: [R] Heatmap Colnames

2016-04-05 Thread Jim Lemon
Hi Nils, I don't have the GMD library, but this looks like some axis labels are being ignored to avoid overlapping. If heatmap.3 uses base graphics you can probably get your labels by passing empty strings to heatmap.3 and then displaying the axis with staxlab (plotrix). Jim On Wed, Apr 6, 2016

Re: [R] Heatmap.2 error

2015-06-19 Thread Adams, Jean
Pijush, The error is a result of you having repeated color values. The warnings can be addressed by changing the arguments that you use. Attachments are removed from posts to R Help, so I used different data to show you an example. Jean library(gplots) data(mtcars) x <- as.matrix(mtcars[1:6

Re: [R] Heatmap

2015-05-22 Thread Jim Lemon
Hi Carlos, The error from: readShapePoly("depto.shp") may well be that the function cannot find the file. Assuming that there is a file "depto.shp", is it in the working directory of R when you issue this command? Find out by: getwd() I suppose that macintosh computers try to hide the actual lo

Re: [R] Heatmap

2015-05-22 Thread David Winsemius
On May 22, 2015, at 10:32 AM, Carlos Javier Rincon Rodriguez wrote: > Hi. Good morning. > > I am trying to load a shapefile to do a heatmap of Colombia. I using all > this package: > > library(ctv) > > library(spatial) > > library(ggplot2) > > library(sp) > > library(rgdal) > > library(rge

Re: [R] Heatmap

2015-05-22 Thread Carlos Javier Rincon Rodriguez
Hi. Good morning. I am trying to load a shapefile to do a heatmap of Colombia. I using all this package: library(ctv) library(spatial) library(ggplot2) library(sp) library(rgdal) library(rgeos) library(maptools) library(ggmap) and a using this two commands to load the file: depto<-read

Re: [R] Heatmap

2015-04-28 Thread John Sorkin
Look at the heatmap function > John David Sorkin M.D., Ph.D. > Professor of Medicine > Chief, Biostatistics and Informatics > University of Maryland School of Medicine Division of Gerontology and > Geriatric Medicine > Baltimore VA Medical Center > 10 North Greene Street > GRECC (BT/18/GR) > Bal

Re: [R] Heatmap - strange horizontal lines

2014-10-24 Thread Jeff Newmiller
I don't use these functions often enough to know their idiosyncrasies, but they appear to treat zero like a NA, and your second file has lots of zeros. I suspect this is due to the default way the continuous act data are 'cut" excluding the left side of the bins. If you read the help files you m

Re: [R] Heatmap, and heatmap.2 gave different figures for the same dataset

2013-12-12 Thread capricy gao
Thank you very much for the hints. I fixed the problem. On Thursday, December 12, 2013 2:08 PM, Kevin Wright wrote: Read the help page for both and pay particular attention to the "scale" argument. Kevin Wright On Thu, Dec 12, 2013 at 9:45 AM, capricy gao wrote: I have a huge datas

Re: [R] Heatmap, and heatmap.2 gave different figures for the same dataset

2013-12-12 Thread Kevin Wright
Read the help page for both and pay particular attention to the "scale" argument. Kevin Wright On Thu, Dec 12, 2013 at 9:45 AM, capricy gao wrote: > I have a huge dataset(15k X 18) and tried to use the heatmap in R to > examine the patterns. However, I found that heatmap and heatmap.2 gave me

Re: [R] Heatmap Help

2013-12-11 Thread Sarah Goslee
You have some randomly doubled quotation marks and parentheses. A text editor with syntax highlighting is wonderful for catching that sort of problem. Beyond that, see: ?heatmap A "very urgent" request suggests homework to me, which this list doesn't do. Though sometimes someone will offer a h

Re: [R] heatmap scale parameter question

2013-08-01 Thread Witold E Wolski
I do not want to use the b word, but can anyone who also subscribes to the r-developer list forward my observation regarding heatmap? I am pretty confident that the behaviour of heatmap in R 3.0.1 is not that one intended. On 31 July 2013 14:03, Witold E Wolski wrote: > Would anyone of the mor

Re: [R] heatmap scale parameter question

2013-07-31 Thread David Carlson
In your example all of the values are drawn from the same distribution so there will not be substantial differences (row means/variances and column means/variances will be approximately the same). set.seed(42) d <- matrix(rnorm(100),nrow=20) # Start with your example and modify the row/col means

Re: [R] Heatmap with error message: `x' must be a numeric matrix

2013-06-26 Thread peter dalgaard
On Jun 25, 2013, at 21:51 , Rui Barradas wrote: > Hello, > > Your data has commas as decimal points, R uses the period. So the data is > read in as strings, not numbers. You can change this by using argument 'dec' > of read.table: > > ?read.table > read.table(...etc..., dec = ",") > > > Or

Re: [R] Heatmap with error message: `x' must be a numeric matrix

2013-06-25 Thread Rui Barradas
Hello, Your data has commas as decimal points, R uses the period. So the data is read in as strings, not numbers. You can change this by using argument 'dec' of read.table: ?read.table read.table(...etc..., dec = ",") Or you can replace the commas with periods: data[] <- sapply(data, func

Re: [R] heatmap.2 problem

2013-01-13 Thread Peter Davidsen
Sorry, I should have added library(gplots) in the beginning of my code On Sun, Jan 13, 2013 at 5:04 PM, Uwe Ligges wrote: >> >> mycol <- colorpanel(n=3,"green","grey","red") - - - Peter K Davidsen | MSc, PhD stud. | Centre for Systems Biology | Univ. of Liverpool | Crown Street | L69 7ZB, U

Re: [R] heatmap.2 problem

2013-01-13 Thread Uwe Ligges
On 12.01.2013 23:40, Peter Davidsen wrote: Dear List, I'm trying to generate a simple heatmap that has each row and column separated by a black line. However, for some reason this only happens for the first and last color. The middle color in my colorpanel() command has an addition horizontal

Re: [R] heatmap with symbols

2012-11-15 Thread Jean V Adams
Use the col= argument to the heatmap() function to specify the three colors you want. For example: x <- matrix(rnorm(50), ncol=5) heatmap(x, col=1:3) Jean furor wrote on 11/14/2012 03:31:42 AM: > > Hi all, > > I've made a heatmap using '-', '=' and '+' as possible values. H

Re: [R] Heatmap Colors

2012-09-29 Thread Achim Zeileis
On Fri, 28 Sep 2012, David Winsemius wrote: On Sep 28, 2012, at 4:52 PM, David Winsemius wrote: On Sep 28, 2012, at 3:16 PM, Nick Fankhauser wrote: Hello R-Users! I'm using a heatmap to visualize a matrix of values between -1 and 3. How can I set the colors so that white is zero, below ze

Re: [R] Heatmap Colors

2012-09-28 Thread David Winsemius
On Sep 28, 2012, at 4:52 PM, David Winsemius wrote: > > On Sep 28, 2012, at 3:16 PM, Nick Fankhauser wrote: > >> Hello R-Users! >> >> I'm using a heatmap to visualize a matrix of values between -1 and 3. >> How can I set the colors so that white is zero, below zero is blue of >> increasing in

Re: [R] Heatmap Colors

2012-09-28 Thread David Winsemius
On Sep 28, 2012, at 3:16 PM, Nick Fankhauser wrote: > Hello R-Users! > > I'm using a heatmap to visualize a matrix of values between -1 and 3. > How can I set the colors so that white is zero, below zero is blue of > increasing intensity towards -1 and above zero is red of increasing intensity

Re: [R] heatmap

2012-05-13 Thread David Winsemius
On May 13, 2012, at 11:23 AM, li li wrote: Dear all, I have a data set which is 100 \times 100 matrix. I made a heatmap of the data. The xlim and ylim are both shown to be c(0,1). I want to make both the xlim and ylim to be c(0,100). So the heatmap correspond to the 100 \times 100 locations.

Re: [R] Heatmap fidelity

2012-04-26 Thread Steven Wolf
Thanks! -Steve -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Thursday, April 26, 2012 9:28 AM To: Steven Wolf Cc: r-help@r-project.org Subject: Re: [R] Heatmap fidelity On 26/04/2012 9:01 AM, Steven Wolf wrote: > I'm having a problem when using

Re: [R] Heatmap fidelity

2012-04-26 Thread Duncan Murdoch
On 26/04/2012 9:01 AM, Steven Wolf wrote: I'm having a problem when using heatmap. Even though the diagonal of my matrix is all the same value, the diagonal of my heatmap is not all the same color. Any suggestions? heatmap() rescales the matrix by default. Use heatmap(abs(psim), scale="none

Re: [R] heatmap.2 (blurred output heatmap)

2011-11-29 Thread Uwe Ligges
example(heatmap.2) works for me, hence it is either your data, your version of some package or your version of R that causes the problems, we do not have information of any of these although the posting guide asks you to provide this for each posting. So we cannot help. Uwe Ligges On 29.11.2

Re: [R] heatmap for plotting categorical matrix

2011-10-24 Thread Yihui Xie
not sure about gplots, but the one in base R should work well if you specify the scaling method to be 'none': heatmap(a4[1:40, ], Rowv=NA, Colv=NA, col=c("grey", "blue", "purple", "red"), scale='none') Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statisti

Re: [R] heatmap

2011-09-06 Thread Gene Leynes
I wrote this function (borrowing heavily from an example from Longhow Lam) heatplot = function(x,y,z,bgcol="#777044",coltype='heat', ccex = 1.5, circles=TRUE, ...){ #browser() layout(matrix(c(1, 2, 3), nc=3), widths=c(7, 1, .5)) ## create the scatterplot withdifferent color

Re: [R] heatmap

2011-09-06 Thread Jinrui Xu
Hi Sarah, To me, the heatmap function calculates "density value" for each grid of the heatmap automatically from the input matrix. In my case, I already got the "density value" as a vector, say Z. I want to plot a heat map with x and y as is axsis and z values as the "density" of grid. I

Re: [R] heatmap

2011-09-06 Thread Sarah Goslee
You mean like the examples in help("heatmap") ? On Tue, Sep 6, 2011 at 1:20 PM, Jinrui Xu wrote: > Hi everyone, > > I have three numerica vectors: x, y, z. I want to plot a heatmap or surface > plot of z against x and y. Is there any package for this? If possible, > please drop me several lines o

Re: [R] heatmap is producing unwanted horizontal and vertical lines?

2011-08-09 Thread Colin Ford
"r-help@r-project.org" Sent: Tuesday, 9 August 2011, 1:32 Subject: Re: [R] heatmap is producing unwanted horizontal and vertical lines? Is it this? https://stat.ethz.ch/pipermail/r-devel/2011-July/061540.html Try a recent version of R 2.13.1 patched > Hi Pete, > > I thought it

Re: [R] heatmap is producing unwanted horizontal and vertical lines?

2011-08-09 Thread Uwe Ligges
d and that was giving the same result as well. What I'm wanting are blocks together without the white lines going through but just cant seem to find a way to do that? Best regards, Col. From: Peter Morgan To: Colin Ford Sent: Monday, 8 August 2011, 1

Re: [R] heatmap is producing unwanted horizontal and vertical lines?

2011-08-08 Thread Michael Sumner
'm wanting are blocks together without the white lines going through > but just cant seem to find a way to do that? > > Best regards, > Col. > > > > From: Peter Morgan > To: Colin Ford > Sent: Monday, 8 August 2011, 14:37 &

Re: [R] heatmap is producing unwanted horizontal and vertical lines?

2011-08-08 Thread David Winsemius
Search terms likely to be productive: white lines anti-aliasing pdf (or variations there within) -- David Best regards, Col. From: Peter Morgan To: Colin Ford Sent: Monday, 8 August 2011, 14:37 Subject: Re: [R] heatmap is producing unwanted horizontal and vertical l

Re: [R] heatmap is producing unwanted horizontal and vertical lines?

2011-08-08 Thread Colin Ford
nt: Monday, 8 August 2011, 14:37 Subject: Re: [R] heatmap is producing unwanted horizontal and vertical lines? Hi Col, Without seeing your data and the heatmap you are plotting it is hard to tell what is going on. Are the NAs in any pattern?  NAs appear in heatmap as the background colour which

Re: [R] heatmap with RNA-Seq data

2011-07-18 Thread rebioman
That what I did, I replaced the -infinite with lowest number I got from my data set. I'm not sure this kind of data manipulation is allowed in a publication -- View this message in context: http://r.789695.n4.nabble.com/heatmap-with-RNA-Seq-data-tp3676207p3676280.html Sent from the R help mailing

Re: [R] heatmap with RNA-Seq data

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 3:34 PM, rebioman wrote: Hi all, new to this forum I'm try to using R to draw a heatmap of my RNA-seq data before doing that I did a log2 transformation of my data and produce a lot -inf in the matrix when I try to use the heatmap function, it seems can not deal with th

Re: [R] Heatmap in R and/or ggplot2

2011-06-15 Thread idris
Thanks for the tip on the limit attribute on scale_fill_gradientn. I'll check out mencoder and let you know if I use your code for the movie. Cheers -- View this message in context: http://r.789695.n4.nabble.com/Heatmap-in-R-and-or-ggplot2-tp3594590p3600034.html Sent from the R help mailing li

Re: [R] Heatmap in R and/or ggplot2

2011-06-15 Thread JiHO
On Tue, Jun 14, 2011 at 19:56, idris wrote: > Follow up question: My data contains x, y, height, and day. > > I want to create the heatmap for each day, keeping the color coding > consistent. > > I've created an example with 2 days, and you can see the charts below. > > Notice that the legend chan

Re: [R] heatmap with values

2011-06-15 Thread Jim Lemon
On 06/14/2011 08:53 PM, Agustin Lobo wrote: Hi! I'm displaying a contingency table with heatmap(): svm.predPix.tabla svm.predPix CC DD LL NN NN2 CC 22 0 3 8 3 DD 0 27 0 1 0 LL 1 1 90 3 7 NN 2 0 1 11 4 NN2 0 0 5 1 20 h

Re: [R] Heatmap in R and/or ggplot2

2011-06-14 Thread idris
Thanks for your help! Follow up question: My data contains x, y, height, and day. I want to create the heatmap for each day, keeping the color coding consistent. I've created an example with 2 days, and you can see the charts below. Notice that the legend changes from day 1 to day 2. How can I

Re: [R] Heatmap in R and/or ggplot2

2011-06-13 Thread baptiste auguie
Hi, Try this ggplot(df, aes(x,y)) + geom_tile(aes(fill=height), colour="white") + scale_fill_gradientn(colours = c("red", "gold", "green")) + geom_text(aes(lab=height)) HTH, baptiste On 14 June 2011 07:12, idris wrote: > I have a dataframe df with columns x, y, and height. I want to create a

Re: [R] heatmap question

2011-06-03 Thread Mark Aquino
Brilliant, that's exactly what I needed. Thank you. The axis labels are duplicated on top and the bottom now though, but I'm sure there's a way to suppress them from appearing. On Jun 3, 2011, at 11:24 AM, David Winsemius wrote: > > On Jun 3, 2011, at 9:26 AM, Mark Aquino wrote: > >> Yes I u

Re: [R] heatmap question

2011-06-03 Thread David Winsemius
On Jun 3, 2011, at 9:26 AM, Mark Aquino wrote: Yes I understand what ? means, I meant is it possible to use this function (as an argument) with heatmap.2, but I learned I can use add.expr=mtext() to do that. However I'm not simply trying to add more text to the graph but rather move

Re: [R] heatmap question

2011-06-03 Thread Mark Aquino
Yes I understand what ? means, I meant is it possible to use this function (as an argument) with heatmap.2, but I learned I can use add.expr=mtext() to do that. However I'm not simply trying to add more text to the graph but rather move the display of the x-axis labels from the bottom of

Re: [R] heatmap question

2011-06-02 Thread David Winsemius
On Jun 2, 2011, at 4:08 PM, Mark Aquino wrote: Hi, I have what would seem to be a very simple problem but have been unable to find any way to go about solving it: I am using heatmap.2 to create a heatmap and by default the x axis label is at the bottom of the heatmap, I simply want to move

Re: [R] heatmap.3

2011-05-05 Thread elodie
I am intesrested by your heatmap function (allowing matrix in ColSideColors option). Can you give your complete code of your function? thanks -- View this message in context: http://r.789695.n4.nabble.com/heatmap-3-tp1566584p3498156.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] heatmap.2 - change column & row locations; angle / rotate

2011-04-18 Thread Karl Brand
Hi Chakravarthy, [dont forget to Cc the list for useRs with the same Q.] If you're trying to reuduce the isze of your row or column labels, i think the following arguments of heatmap.2 {gplots} is what you want to adjust- 'cexCol' and 'cexRow'. Specifically on my question that you ask about,

Re: [R] heatmap-how to change the order of the rows (genes)

2011-02-09 Thread Mike Marchywka
> Date: Wed, 9 Feb 2011 12:18:57 -0500 > From: yanliu...@gmail.com > To: r-help@r-project.org > Subject: [R] heatmap-how to change the order of the rows (genes) > > Hi, > > I have a question about the heatmap dendrogram in R. I loaded my data > matrix in

Re: [R] heatmap-how to change the order of the rows (genes)

2011-02-09 Thread Steve Lianoglou
Hi, On Wed, Feb 9, 2011 at 12:18 PM, yan liu wrote: > Hi, > > I have a question about the heatmap dendrogram in R.  I loaded my data > matrix in command heatmap(), and it gave me a heatmap accordingly, and the > rows (genes) also were clustered accordingly.  But now I don't want the > genes clust

Re: [R] Heatmap construction problems

2010-11-07 Thread Hadley Wickham
It's hard to know without a minimal reproducible example, but you probably want scale_fill_gradient or scale_fill_gradientn. Hadley On Thu, Oct 28, 2010 at 9:42 AM, Struchtemeyer, Chris wrote: > I am very new to R and don't have any computer program experience > whatsoever.  I am trying to gener

Re: [R] Heatmap/Color Selection(Key)

2010-10-11 Thread Eik Vettorazzi
sorry, typo: > heatmap.2(x,col=colorRampPalette(c("blue","lightblue","darkgray","darkgray","yellow","red"),space="Lab"),at=c(-6.01,6.01,51)) > heatmap.2(x,col=c("blue","lightblue","darkgray","black","darkgray","yellow","red"),at=-3:3*2) should be read as heatmap.2(x,col=colorRampPalette(c("blue

Re: [R] Heatmap/Color Selection(Key)

2010-10-11 Thread Eik Vettorazzi
Hi Rashid, you may have a look at the colorRampPalette-function, along with the "at" argument oh heatmap.2 x<-matrix(runif(100,-6,6),nrow=10) heatmap.2(x,col=colorRampPalette(c("blue","lightblue","darkgray","darkgray","yellow","red"),space="Lab"),at=c(-6.01,6.01,51)) # or just using the colors you

Re: [R] heatmap.2() yielding an inappropriate key?

2010-07-19 Thread Karl Brand
I see now my error, several in fact: The 'breaks' specified need to be of a similar range to the data range, and they should be equally spaced. So in my example: breaks = seq(0, 0.2, 0.001) If one needs uneqaully spaced coloring, as i do, then this is achieved by specifying the approprate c

Re: [R] heatmap.2 - ColSideColors question

2010-03-16 Thread Rainer Machne
On 03/16/2010 04:06 PM, Tim Smith wrote: > Hi, > > I wanted to make more than one side color bar. The function heatmap.plus (library: heatmap.plus) can do that, just combine the different color vectors with cbind(col1,col2). Unfortunately the arguments required for heatmap, heatmap.2 and heatmap

Re: [R] Heatmap reordering of dendrogram to hierarchical clustering

2010-03-06 Thread gireesh bogu
data(warpbreaks) ## given two factors coplot(breaks ~ 1:54 | wool * tension, data = warpbreaks, col = "red", bg = "pink", pch = 21, bar.bg = c(fac = "light blue")) ## conditionalplot #

Re: [R] heatmap.3

2010-02-24 Thread joonR
If anyone is interested, I solved the problem by modifying the lhei parameter (if ColSideColors is used, lwid for Row..) and making it parametric: lhei=c(lhei[1], 0.1*noan, lhei[2]) where noan is an additional parameter passed to the function that specifies the number of annotations. best, j -

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
also, can you point me to some example of how to omit colors from a palette -- View this message in context: http://n4.nabble.com/heatmap-2-color-range-tp1293498p1311031.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
thanks, I think I got the color ranges down, however, I just realized that the colors don't match the data. When I execute: grad <- ifelse(randMat > 5,yelPal,ifelse(randMat<1.5,redPal,bluPal)) the grad matrix contains the correct hex codes corresponding to the randMat data matrix but when I

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
as a followup, I tried using the rainbow function to create the gradients but is there a way to do a "reverse" rainbow, ie. normally if I do: pie(rep(1,6), col=rainbow(6,start=0, end=.07)) I'll get a gradient from dark red to orangish but what if I want it to go the other way thanks -- View t

Re: [R] heatmap.2 color range

2010-01-26 Thread Dieter Menne
evgeny55 wrote: > > I'm trying to create a heatmap with color ranges for 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")

Re: [R] heatmap/image from csv data

2009-12-10 Thread Liat
This worked :o) Thanks very much! Liat wrote: > > 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

Re: [R] heatmap/image from csv data

2009-12-10 Thread David Winsemius
On Dec 10, 2009, at 10:19 AM, Liat wrote: I have looked at the help for data.matrix. But didn't find a solution. data.matrix only gets two arguments the data and a logical rownames.force - I have tried to change this logical to TRUE but that doesn't help. Any advice would be greatly appreci

Re: [R] heatmap/image from csv data

2009-12-10 Thread Liat
I have looked at the help for data.matrix. But didn't find a solution. data.matrix only gets two arguments the data and a logical rownames.force - I have tried to change this logical to TRUE but that doesn't help. Any advice would be greatly appreciated. Thanks!! Liat wrote: > > Hi all, > I'm tr

Re: [R] heatmap/image from csv data

2009-12-10 Thread David Winsemius
On Dec 10, 2009, at 8:25 AM, Liat wrote: 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

Re: [R] heatmap.2 adapting the colour scale and text overlay

2009-11-23 Thread David Winsemius
On Nov 23, 2009, at 10:02 AM, Daniel Brewer wrote: Hello, I am using heatmap.2 from the gplots library to plot a small symmetrical matrix. This is the command: heatmap. 2 (tempHeat ,symm = T ,trace ="none",cexRow=0.7,cexCol=0.7,col="redgreen",density.info="none") I have a couple

Re: [R] heatmap.2

2009-10-13 Thread Dieter Menne
John Celniker wrote: > > ... > when I try to change the breaks to: >> br2 > [1] 0.000 0.5337751 1.0675502 1.6013253 2.1351003 3.000 > 3.500 4.000 4.500 > [10] 4.8039758 > > I get the correct heatmap representation but the color key does not > update correctly to reflect c

Re: [R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread Schalk Heunis
Try placing the column names into labCol and the rownames into labRow e.g.heatmap.2(mat,dendrogram=c("none"), Rowv=F, Colv=F, labRow = seq(-7.5,7.5,by=5), labCol=seq(-3,3,by=2)) Schalk Heunis On Thu, Sep 17, 2009 at 3:53 PM, bioinformatics_guy wrote: > > Schalk, > > Thats a great function! The o

Re: [R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread bioinformatics_guy
Schalk, Thats a great function! The only question is, is it as flexible as heatmap.2? I figured out how to get it from rearranging the rows and columns but I can't figure out how to label the rows and columns? What I like about the heatmap.2 is that it gives a grid and histogram of the heatmap

Re: [R] heatmap.2() problems with re-ordering of rows and columns

2009-09-17 Thread Schalk Heunis
Hi bioinformatics_guy I think you are looking for the "image" function: image(mat) The heatmap.2 function does hierarchical clustering on rows and columns and then orders the rows and columns according to the results of the clustering. Image simply plots the matrix. HTH Schalk Heunis On Thu, S

Re: [R] heatmap plot

2009-07-21 Thread Michael Knudsen
2009/7/21 Markus Mühlbacher : > I tried to add white to the colors, but this did not change my problem. Still > the values of the diagonal seem to be different from those occurring in the > matrix. Or in other words all squares of the diagonal should have to SAME > color! If you can send me th

Re: [R] heatmap plot

2009-07-20 Thread Michael Knudsen
2009/7/21 Markus Mühlbacher : > So just that I understand right. x and y are the scalings of the x and y axis > and the matrix represents the color of the points at each gridpoint? Precisely! Try ?image for more details. -- Michael Knudsen micknud...@gmail.com http://lifeofknudsen.blogspot.com

Re: [R] heatmap plot

2009-07-20 Thread 1Rnwb
since heatmap is a graphic image it needs the "graphics" library. you can see these two in the examples for heatmap. require(graphics); require(grDevices) Markus Mühlbacher wrote: > > Dear R community! > > I am trying to create a heatmap based on the following data. As you can > see the diago

Re: [R] heatmap plot

2009-07-20 Thread Michael Knudsen
2009/7/20 Markus Mühlbacher : > Gives the attached image. Again I am missing the white diagonal. Is there > some kind of sorting that I do not consider? Maybe col=c("white",heat.colors(100)) will do the trick? -- Michael Knudsen micknud...@gmail.com http://lifeofknudsen.blogspot.com/

Re: [R] heatmap plot

2009-07-20 Thread Michael Knudsen
2009/7/20 Markus Mühlbacher : > What is my mistake? I don't know about the heatmap function, but I have often used 'image' with 'heat.colors' without any problems. There is a nice example here: http://addictedtor.free.fr/graphiques/graphcode.php?graph=20 It should be fairly easy to fit your dat

Re: [R] heatmap.2: question regarding the "raw z-score"

2009-07-09 Thread James W. MacDonald
Hi Chrysanthi, Chrysanthi A. wrote: Thanks a lot..! What exactly the sweep function is doing? Also, is there a possibility instead of using the mean of the whole row to get only the mean of a group of the row values? So the values in the matrix (heat map) used in the comparison are z-scores

Re: [R] heatmap.2: question regarding the "raw z-score"

2009-07-09 Thread Chrysanthi A.
Thanks a lot..! What exactly the sweep function is doing? Also, is there a possibility instead of using the mean of the whole row to get only the mean of a group of the row values? So the values in the matrix (heat map) used in the comparison are z-scores and not the intensities of the gene express

Re: [R] heatmap.2: question regarding the "raw z-score"

2009-07-08 Thread James W. MacDonald
Hi Chrysanthi, Chrysanthi A. wrote: Hi, I am analysing gene expression data using the heatmap.2 function in R and I was wondering what is the formula of the "raw z-score" bar which shows the colors for each pixel. According to that post: https://mailman.stat.ethz.ch/pipermail/r-help/2006-Septem

Re: [R] Heatmap

2009-06-08 Thread Jorge Ivan Velez
Dear Alex, Take a look at the examples in # Option 1 ?heatmap # Option 2 require(gplots) ?heatmap.2 HTH, Jorge On Mon, Jun 8, 2009 at 9:32 AM, Alex Roy wrote: > Hello Group, >How can I draw heatmap with variable names in the plot? > > Thanks > > Alex > >[[alterna

Re: [R] Heatmap

2009-06-08 Thread Liaw, Andy
Couldn't you get that just by giving heatmap() the transpose of your data? > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Alex Roy > Sent: Monday, June 08, 2009 9:32 AM > To: r-help@r-project.org > Subject: [R] Heatmap > >

Re: [R] Heatmap: draw horizontal line

2009-05-06 Thread Paul Evans
Thanks Matthias! Exactly what I was looking for. Paul From: Matthias Kohl Cc: r-h...@stat.math.ethz.ch Sent: Wednesday, May 6, 2009 2:06:22 PM Subject: Re: [R] Heatmap: draw horizontal line Is heatmap.2(mat,Rowv=NA,trace = 'none',key=F, add.expr

Re: [R] Heatmap: draw horizontal line

2009-05-06 Thread Matthias Kohl
Is heatmap.2(mat,Rowv=NA,trace = 'none',key=F, add.expr = abline(h = c(3.5,5.5), lwd = 3)) what your are looking for? hth, Matthias Paul Evans schrieb: Hi, I wanted to draw a heatmap with some horizontal lines. For example: #-- code -- mat <- matrix(-1:1,7,9) heatmap.2(mat,Rowv=NA

Re: [R] Heatmap without levelplot

2009-05-06 Thread Uwe Ligges
Antje wrote: Hi Uwe, thanks a lot for your answer! And thanks a lot to all others helping me with this issue! Uwe Ligges schrieb: Antje wrote: Hi Uwe, I tried to explain my problem with the given example. I don't see any documentation which tells me that the length of "col.regions" sh

Re: [R] Heatmap without levelplot

2009-05-05 Thread Antje
Hi Uwe, thanks a lot for your answer! And thanks a lot to all others helping me with this issue! Uwe Ligges schrieb: Antje wrote: Hi Uwe, I tried to explain my problem with the given example. I don't see any documentation which tells me that the length of "col.regions" should be one less

Re: [R] Heatmap without levelplot

2009-05-05 Thread Uwe Ligges
Antje wrote: Hi Uwe, I tried to explain my problem with the given example. I don't see any documentation which tells me that the length of "col.regions" should be one less than "at". (At least I assume now that it should be this way...) If it's equal or longer some colors (in the middle of t

Re: [R] Heatmap without levelplot

2009-05-05 Thread Greg Snow
The image function in base graphics does the same type of plot, just different names and structure of the data (and the documentation says that the number of breaks should be 1 more than the number of colors). Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermounta

Re: [R] Heatmap without levelplot

2009-05-05 Thread Antje
Hi Uwe, I tried to explain my problem with the given example. I don't see any documentation which tells me that the length of "col.regions" should be one less than "at". (At least I assume now that it should be this way...) If it's equal or longer some colors (in the middle of the color-vector)

Re: [R] Heatmap without levelplot

2009-05-05 Thread Uwe Ligges
Antje wrote: Hi there, as I'm not sure to understand the coloring levelplot uses, I'm looking for another easy way to create a heatmap like this: library(lattice) mat <- matrix(seq(1,5, length.out = 12), nrow = 3) mat[1,2] <- 3.5 my.at <- seq(0.5,5.5, length.out = 6) my.col.regions <- rain

Re: [R] Heatmap without levelplot

2009-05-05 Thread Dieter Menne
Antje yahoo.de> writes: > as I'm not sure to understand the coloring levelplot uses, I'm looking for > another easy way to create a heatmap like this: > > library(lattice) > mat <- matrix(seq(1,5, length.out = 12), nrow = 3) > mat[1,2] <- 3.5 > > my.at <- seq(0.5,5.5, length.out = 6) > my.col.

Re: [R] heatmap.2 no reordering of the columns and rows

2009-04-07 Thread Tanuja Bompada
Thanks James. That worked. Tanuja --- On Tue, 4/7/09, James W. MacDonald wrote: From: James W. MacDonald Subject: Re: [R] heatmap.2 no reordering of the columns and rows To: "Tanuja Bompada" Cc: r-help@r-project.org Date: Tuesday, April 7, 2009, 8:02 AM Hi Tanuja, Tanuja Bom

Re: [R] heatmap.2 no reordering of the columns and rows

2009-04-07 Thread James W. MacDonald
Hi Tanuja, Tanuja Bompada wrote: Hi, I need to generate a heatmap on a square matrix and wouldn't want to reorder the columns and the rows on the heatmap display. I have used the options Rowv=NULL and Colv=NULL but doesn't seem to work. Following is a snippet of the heatmap function i am u

Re: [R] heatmap and colour key

2009-03-11 Thread Stephen J. Barr
Check out http://cran.r-project.org/web/packages/RColorBrewer/index.html On Wed, Mar 11, 2009 at 10:41 PM, Daren Tan wrote: > I would like to visualize my data via heatmap so that the value range > c(-2,2) corresponds to greenred(75). However, heatmap uses the min and > max from my dataset instea

Re: [R] heatmap with levelplot

2009-01-26 Thread Antje
I played a little bit around and got the following solution which works for now, though it seems to be too complicated to me. If anybody else know another solution - please let me know!!! library(lattice) my.mat <- matrix(rnorm(800), nrow = 40) colorFun <- colorRampPalette(c("yellow","red"))

Re: [R] heatmap with levelplot

2009-01-26 Thread Antje
I played a little bit around and got the following solution which works for now, though it seems to be too complicated to me. If anybody else know another solution - please let me know!!! library(lattice) my.mat <- matrix(rnorm(800), nrow = 40) colorFun <- colorRampPalette(c("yellow","red")) b

Re: [R] heatmap.2 color issue

2009-01-21 Thread Matthias Kohl
the heatmapCol function of package MKmisc might help ... try: library(MKmisc) example("heatmapCol") Best Matthias Liu, Hao [CNTUS] wrote: Dear All: I tried to use heatmap.2 to generate hierarchical clustering using the following command: heatmap.2(datamatrix, scale="row", trace="none", col=g

  1   2   >