Question: Error: could not find function "heatmap.2"
0
gravatar for madkitty
5.3 years ago by
madkitty590
Canada
madkitty590 wrote:

I'm using DESeq2 and Bioconductor. When loading the heatmap I got the following error message :

Error: could not find function "heatmap.2"

Here is my pipeline:

> library( "genefilter" )

> topVarGenes <- head( order( rowVars( assay(rld) ), decreasing=TRUE ), 35 )

> heatmap.2( assay(rld)[ topVarGenes, ], scale="row",
+ trace="none", dendrogram="column",
+ col = colorRampPalette( rev(brewer.pal(9, "RdBu")) )(255))
Error: could not find function "heatmap.2"

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252    LC_MONETARY=English_Canada.1252 LC_NUMERIC=C                   
[5] LC_TIME=English_Canada.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] genefilter_1.44.0       Biobase_2.22.0          DESeq2_1.2.10           RcppArmadillo_0.4.320.0 Rcpp_0.11.2             GenomicRanges_1.14.4   
[7] XVector_0.2.0           IRanges_1.20.7          BiocGenerics_0.8.0     

loaded via a namespace (and not attached):
 [1] annotate_1.40.1      AnnotationDbi_1.24.0 colorspace_1.2-4     DBI_0.2-7            digest_0.6.4         ggplot2_1.0.0       
 [7] grid_3.0.2           gtable_0.1.2         lattice_0.20-29      locfit_1.5-9.1       MASS_7.3-33          munsell_0.4.2       
[13] plyr_1.8.1           proto_0.3-10         RColorBrewer_1.0-5   reshape2_1.4         RSQLite_0.11.4       scales_0.2.4        
[19] splines_3.0.2        stats4_3.0.2         stringr_0.6.2        survival_2.37-7      XML_3.98-1.1         xtable_1.7-3        
heatmap rna-seq deseq2 • 18k views
ADD COMMENTlink modified 5.3 years ago by Alex Reynolds29k • written 5.3 years ago by madkitty590

If you fail to find any function while using R just google it and see which package it comes from.

ADD REPLYlink written 5.3 years ago by oganm60
1

Sometimes you can even get their without bothering with a mouse. Though it seems this is not one of those times RSiteSearch("heatmap.2", restrict="functions") turns up another function but not the `gplots` on

ADD REPLYlink modified 5.3 years ago • written 5.3 years ago by David W4.7k
2
gravatar for madkitty
5.3 years ago by
madkitty590
Canada
madkitty590 wrote:

Just for those who are running into the same issue: 

1. Install the package gplots

install.packages("gplots")

 

2. Run the library gplots

library(gplots) 

 

ADD COMMENTlink written 5.3 years ago by madkitty590
2
gravatar for Charles Warden
5.3 years ago by
Charles Warden7.3k
Duarte, CA
Charles Warden7.3k wrote:

I believe this tutorial has instructions on how to install and use the heatmap functions (including heatmap.2):

http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/r/heatmap/

More specifically, you need to have the 'gplots' package installed.

ADD COMMENTlink modified 5.3 years ago • written 5.3 years ago by Charles Warden7.3k
2
gravatar for Assa Yeroslaviz
5.3 years ago by
Assa Yeroslaviz1.2k
Munich
Assa Yeroslaviz1.2k wrote:

heatmap.2 needs the package gplots

 

 

ADD COMMENTlink written 5.3 years ago by Assa Yeroslaviz1.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 763 users visited in the last hour