diff --git a/DESCRIPTION b/DESCRIPTION index 9e2fc23..599b5ca 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,7 @@ Authors@R: c( person("Alan", "O'Callaghan", comment = "https://github.com/Alanocallaghan",role = "aut"), person("Jonathan", "Sidi", email = "yonis@metrumrg.com", comment = "https://github.com/yonicd",role = "ctb"), person("Jaehyun", "Joo", comment = "https://github.com/jaehyunjoo",role = "ctb"), - person("Yoav", "Benjamini", email = "ybenja@tau.ac.il",role = "ths")) + person("Yoav", "Benjamini", email = "ybenja@tau.ac.il",role = "ths")), person("Mathew", "Simenc", role = "ctb", comment = "https://gitlab.com/mcsimenc, https://github.com/mcsimenc")) Description: Create interactive cluster 'heatmaps' that can be saved as a stand- alone HTML file, embedded in 'R Markdown' documents or in a 'Shiny' app, and diff --git a/R/heatmaply.R b/R/heatmaply.R index 6a67394..86ee300 100644 --- a/R/heatmaply.R +++ b/R/heatmaply.R @@ -427,12 +427,12 @@ #' #' #' # Example of removing labels and thus making the plot faster -#' heatmaply(iris, showticklabels = c(T, F), margins = c(80, 10)) +#' heatmaply(iris, showticklabels = c(TRUE, FALSE), margins = c(80, 10)) #' #' # this is what allows for a much larger matrix to be printed: #' set.seed(2017 - 05 - 18) #' large_x <- matrix(rnorm(19), 1000, 100) -#' heatmaply(large_x, dendrogram = F, showticklabels = F, margins = c(1, 1)) +#' heatmaply(large_x, dendrogram = FALSE, showticklabels = FALSE, margins = c(1, 1)) #' } heatmaply <- function(x, ...) { UseMethod("heatmaply") @@ -571,7 +571,7 @@ heatmaply.default <- function(x, label_format_fun = function(...) format(..., digits = 4), labRow = NULL, labCol = NULL, custom_hovertext = NULL, - suppress_default_hovertext = F, + suppress_default_hovertext = FALSE, col = NULL, dend_hoverinfo = TRUE, side_color_colorbar_len = 0.3, @@ -643,8 +643,8 @@ heatmaply.default <- function(x, if (is.logical(dendrogram)) { # Using if and not ifelse to make sure the output is a "scalar". dendrogram <- if (dendrogram) "both" else "none" - # if (T) "both" else "none" - # if (F) "both" else "none" + # if (TRUE) "both" else "none" + # if (FALSE) "both" else "none" } dendrogram <- match.arg(dendrogram) @@ -1213,7 +1213,7 @@ heatmaply.heatmapr <- function(x, title = main, # layout's title: /r/reference/#layout-title xaxis = list( # layout's xaxis is a named list. List of valid keys: /r/reference/#layout-xaxis title = xlab # xaxis's title: /r/reference/#layout-xaxis-title - # showgrid = T # xaxis's showgrid: /r/reference/#layout-xaxis-showgrid + # showgrid = TRUE # xaxis's showgrid: /r/reference/#layout-xaxis-showgrid ), yaxis = list( # layout's yaxis is a named list. List of valid keys: /r/reference/#layout-yaxis title = ylab # yaxis's title: /r/reference/#layout-yaxis-title diff --git a/R/plots.R b/R/plots.R index c50c267..f86af27 100644 --- a/R/plots.R +++ b/R/plots.R @@ -103,10 +103,10 @@ ggplot_heatmap <- function(xx, } } if (!is.null(custom_hovertext)) { - if (suppress_default_hovertext) { - mdf[["text"]] <- reshape2::melt(as.matrix(custom_hovertext))[[3]] - } else { + if (!suppress_default_hovertext) { mdf[["text"]] <- paste0(mdf[["text"]], "
", custom_hovertext) + } else { + mdf[["text"]] <- reshape2::melt(as.matrix(custom_hovertext))[[3]] } } geom_args[["mapping"]] <- aes_mapping diff --git a/R/zzz.R b/R/zzz.R index f41ea53..39d8dc2 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -250,7 +250,7 @@ heatmaplyWelcomeMessage <- function() { # # http://stackoverflow.com/questions/10330425/how-do-i-export-a-git-log-to-a-text-file # # http://stackoverflow.com/questions/3523534/good-ways-to-manage-a-changelog-using-git # # http://www.commandlinefu.com/commands/view/12420/generate-a-change-log-with-git -# shell("git log --decorate > ChangeLog", intern = T) +# shell("git log --decorate > ChangeLog", intern = TRUE) # Modify it using: http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History # http://stackoverflow.com/questions/9007181/custom-log-format-omits-newline-at-end-of-output @@ -305,6 +305,6 @@ heatmaplyWelcomeMessage <- function() { # file.copy("NEWS", "NEWS.md",overwrite = TRUE) # devtools::check_win_devel() # pkgdown::build_home() -# pkgdown::build_site(run_dont_run = F) +# pkgdown::build_site(run_dont_run = FALSE) # pkgdown::build_news() # release()