Closed sert23 closed 6 years ago
Could you post a reproducible example please?
library("heatmaply") heatmaply(mtcars, col_side_colors =colnames(mtcars), file = "/home/me/example.html")
sessionInfo() R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.5 LTS
Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.6.0 LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] heatmaply_0.15.2 viridis_0.5.1 viridisLite_0.3.0 plotly_4.8.0
[5] ggplot2_3.0.0
loaded via a namespace (and not attached):
[1] httr_1.3.1 tidyr_0.8.1 jsonlite_1.5
[4] foreach_1.4.4 gtools_3.8.1 shiny_1.1.0
[7] assertthat_0.2.0 stats4_3.4.4 yaml_2.2.0
[10] robustbase_0.93-2 pillar_1.3.0 lattice_0.20-35
[13] glue_1.3.0 digest_0.6.15 RColorBrewer_1.1-2
[16] promises_1.0.1 colorspace_1.3-2 htmltools_0.3.6
[19] httpuv_1.4.5 plyr_1.8.4 pkgconfig_2.0.1
[22] purrr_0.2.5 xtable_1.8-2 mvtnorm_1.0-8
[25] scales_0.5.0 webshot_0.5.0 gdata_2.18.0
[28] whisker_0.3-2 later_0.7.3 tibble_1.4.2
[31] withr_2.1.2 nnet_7.3-12 lazyeval_0.2.1
[34] magrittr_1.5 crayon_1.3.4 mime_0.5
[37] mclust_5.4.1 MASS_7.3-50 gplots_3.0.1
[40] class_7.3-14 tools_3.4.4 registry_0.5
[43] data.table_1.11.4 trimcluster_0.1-2.1 stringr_1.3.1
[46] kernlab_0.9-26 munsell_0.5.0 cluster_2.0.7-1
[49] fpc_2.1-11.1 bindrcpp_0.2.2 compiler_3.4.4
[52] caTools_1.17.1.1 rlang_0.2.1 grid_3.4.4
[55] iterators_1.0.10 htmlwidgets_1.2 crosstalk_1.0.0
[58] bitops_1.0-6 labeling_0.3 gtable_0.2.0
[61] codetools_0.2-15 flexmix_2.3-14 TSP_1.1-6
[64] reshape2_1.4.3 R6_2.2.2 seriation_1.2-3
[67] gridExtra_2.3 prabclus_2.2-6 dplyr_0.7.6
[70] bindr_0.1.1 KernSmooth_2.23-15 dendextend_1.8.0
[73] modeltools_0.2-22 stringi_1.2.4 Rcpp_0.12.18
[76] gclus_1.3.1 DEoptimR_1.0-8 tidyselect_0.2.4
[79] diptest_0.75-7
From ?heatmaply
:
When a data.frame is provided, the column names are used as the label names for each of the newly added row_side_colors. When a vector is provided it is coerced into a data.frame and the name of the side color will be just row_side_colors.
Thanks for the quick replies, I should've checked the row_side_colors parameter. I guess since there's no way to turn them off, I'll change it to a more significant name. Thanks for the help and expect our citation if we get our paper published!
Thanks. You can hide them by setting the column names to be blank, eg:
library("heatmaply")
heatmaply(mtcars, col_side_colors =data.frame(" " = colnames(mtcars)))
ah! nice trick, I didn't know blank column names were allowed
Sorry small mistake (I didn't test at the time) - you need to add check.names=FALSE
:
library("heatmaply")
heatmaply(mtcars, col_side_colors = data.frame(" " = colnames(mtcars), check.names = FALSE))
When I use the col_side_colors parameter I get the heading "col_side_colors" next to the actual colors. I don't see this in the vignettes? How can I remove it? Here's an example:
Thanks guys and very helpful package