Error for Heatmap when perform correlation analysis using the example data

Hello!
I am trying to create correlation heatmaps for the example data but unable to do so on R and run into the following error:

OPTION 1) - Heatmap specifying pearson distance and an overview
My code:

mSet<-PlotCorrHeatMap(mSet, “corr_0_”, format = “png”, dpi = 300, width=NA,
“col”, “pearson”, “bwm”, “overview”, F, F, 0.0)

Console:

#[1] 0 0
#Error in if (fix.col) { : argument is not interpretable as logical

OPTION 2) - Heatmap specifying pearson correlation and a detailed view
My code:

mSet<-PlotCorrHeatMap(mSet, “corr_1_”, format = “png”, dpi=300, width=NA,
“col”, “spearman”, “bwm”, “detail”, F, F, 999)

Console:

#[1] 0 999
#Error in if (fix.col) { : argument is not interpretable as logical

My session information:

sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8

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

other attached packages:
[1] iheatmapr_0.7.1 memoise_2.0.1 ggplot2_3.5.1 scales_1.3.0
[5] Rserve_1.8-13 MetaboAnalystR_4.0.0 devtools_2.4.5 usethis_2.2.3

loaded via a namespace (and not attached):
[1] fastmatch_1.1-4 plyr_1.8.9 igraph_2.0.3 lazyeval_0.2.2
[5] splines_4.2.0 RApiSerialize_0.1.3 BiocParallel_1.30.4 listenv_0.9.1
[9] digest_0.6.36 foreach_1.5.2 htmltools_0.5.8.1 fansi_1.0.6
[13] magrittr_2.0.3 limma_3.52.4 remotes_2.5.0 fastcluster_1.2.6
[17] recipes_1.1.0 globals_0.16.3 gower_1.0.1 RcppParallel_5.1.8
[21] hardhat_1.4.0 timechange_0.3.0 siggenes_1.70.0 colorspace_2.1-0
[25] blob_1.2.4 ggrepel_0.9.5 xfun_0.45 dplyr_1.1.4
[29] callr_3.7.6 jsonlite_1.8.8 stringfish_0.16.0 impute_1.70.0
[33] survival_3.7-0 iterators_1.0.14 glue_1.7.0 gtable_0.3.5
[37] ipred_0.9-14 pkgbuild_1.4.4 future.apply_1.11.2 BiocGenerics_0.42.0
[41] DBI_1.2.3 edgeR_3.38.4 miniUI_0.1.1.1 Rcpp_1.0.12
[45] viridisLite_0.4.2 xtable_1.8-4 bit_4.0.5 preprocessCore_1.58.0
[49] stats4_4.2.0 lava_1.8.0 prodlim_2024.06.25 profvis_0.3.8
[53] htmlwidgets_1.6.4 httr_1.4.7 fgsea_1.22.0 gplots_3.1.3.1
[57] RColorBrewer_1.1-3 ellipsis_0.3.2 urlchecker_1.0.1 pkgconfig_2.0.3
[61] farver_2.1.2 nnet_7.3-19 locfit_1.5-9.10 utf8_1.2.4
[65] caret_6.0-94 tidyselect_1.2.1 labeling_0.4.3 rlang_1.1.4
[69] reshape2_1.4.4 later_1.3.2 munsell_0.5.1 tools_4.2.0
[73] cachem_1.1.0 cli_3.6.3 generics_0.1.3 RSQLite_2.3.7
[77] stringr_1.5.1 fastmap_1.2.0 knitr_1.48 ModelMetrics_1.2.2.2
[81] processx_3.8.4 bit64_4.0.5 fs_1.6.4 caTools_1.18.2
[85] crmn_0.0.21 scrime_1.3.5 purrr_1.0.2 glasso_1.11
[89] future_1.33.2 nlme_3.1-165 mime_0.12 compiler_4.2.0
[93] rstudioapi_0.16.0 plotly_4.10.4 curl_5.2.1 tibble_3.2.1
[97] stringi_1.8.4 ps_1.7.7 desc_1.4.3 lattice_0.22-6
[101] Matrix_1.5-3 multtest_2.52.0 vctrs_0.6.5 pillar_1.9.0
[105] lifecycle_1.0.4 data.table_1.15.4 cowplot_1.1.3 bitops_1.0-7
[109] httpuv_1.6.15 R6_2.5.1 pcaMethods_1.88.0 qs_0.26.3
[113] promises_1.3.0 KernSmooth_2.23-24 gridExtra_2.3 parallelly_1.37.1
[117] sessioninfo_1.2.2 codetools_0.2-20 MASS_7.3-56 gtools_3.9.5
[121] pkgload_1.4.0 withr_3.0.0 parallel_4.2.0 grid_4.2.0
[125] rpart_4.1.23 timeDate_4032.109 tidyr_1.3.1 class_7.3-22
[129] Cairo_1.6-2 pROC_1.18.5 Biobase_2.56.0 shiny_1.8.1.1
[133] lubridate_1.9.3

Thank you for your guidance on how to fix this error!

Thank you for the note.

The PlotCorrHeatMap should only be used for interactive heatmap used by the web page. For R package, please use PlotStaticCorrHeatMap

We will update the R command history soon

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.