Sorry.  I think you need the argument distfun=as.dist.  E.g.,

heatmap(x, distfun=as.dist, symm=TRUE, scale="none")

Andy

> From: Liaw, Andy
> 
> I believe you want to pass the (symmetric) matrix as is, 
> rather than wrapped
> in as.dist().  E.g.,
> 
> x <- as.matrix(dist(matrix(rnorm(100), 20, 5)))
> heatmap(x, symm=TRUE, scale="none")
> 
> HTH,
> Andy
> 
> > From: Paul Lepp
> > 
> > Dear R wizards,
> >     Hopeful someone can help me with what I believe is a 
> > pretty simple task.  I
> > pretty new to R so some (much) of the obvious escapes me. How 
> > do I get a
> > distance matrix into heatmap?  What do I tell distfun if what 
> > I'm trying to
> > map is already an ordered distance matrix?  I tried >heatmap(x,
> > distfun=as.dist(x)) where x is the distance matrix but R gave 
> > me an error.
> > Thanks in advance for any help.
> > 
> > Paul Lepp
> > 
> >  `-:-.   ,-;"`-:-.   ,-;"`-:-.   ,-;"`-:-.   ,-;"`-:-.   ,-;"`-:-.
> >    `=`,'=/     `=`,'=/     `=`,'=/     `=`,'=/     `=`,'=/     `=`
> >      >==/        >==/        >==/        >==/        >==/
> >    ,=,-<=`.    ,=,-<=`.    ,=,-<=`.    ,=,-<=`.    ,=,-<=`.    ,=,
> > ,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'   `-=_,-'-'
> > Paul Lepp, Ph.D.                       Stanford School of Medicine
> > 
> > VAPAHCS, 154T                   Dept. of Microbiology & Immunology
> > 3801 Miranda Ave                               Stanford University
> > Palo Alto, CA 94304                                   Stanford, CA
> > (650) 493-5000 x66762                              fax: 
> (650) 852-3291
> > http://cmgm.stanford.edu/~pwlepp          [EMAIL PROTECTED]
> > 
> > ______________________________________________
> > [EMAIL PROTECTED] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> > http://www.R-project.org/posting-guide.html
> > 
> >
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 
> --------------------------------------------------------------
> ----------------
> Notice:  This e-mail message, together with any attachments, 
> contains information of Merck & Co., Inc. (One Merck Drive, 
> Whitehouse Station, New Jersey, USA 08889), and/or its 
> affiliates (which may be known outside the United States as 
> Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
> Banyu) that may be confidential, proprietary copyrighted 
> and/or legally privileged. It is intended solely for the use 
> of the individual or entity named on this message.  If you 
> are not the intended recipient, and have received this 
> message in error, please notify us immediately by reply 
> e-mail and then delete it from your system.
> --------------------------------------------------------------
> ----------------
>

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to