talgalili / heatmaply
Showing 3 of 4 files from the diff.

@@ -258,6 +258,9 @@
Loading
258 258
  } else {
259 259
    assert_that(length(label_names) == 3)
260 260
  }
261 +
  if (!is.null(point_size_mat)) {
262 +
    point_size_mat <- as.matrix(point_size_mat)
263 +
  }
261 264
262 265
  if (!is.null(custom_hovertext)) {
263 266
    text_mat <- custom_hovertext
@@ -266,20 +269,20 @@
Loading
266 269
    text_mat[] <- lapply(
267 270
      seq_along(text_mat),
268 271
      function(i) {
269 -
        paste0(
272 +
        lab <- paste0(
270 273
          label_names[1], ": ", rownames(x), "<br>",
271 274
          label_names[2], ": ", colnames(x)[i], "<br>",
272 275
          label_names[3], ": ", label_format_fun(x[, i])
273 276
        )
277 +
        if (!is.null(point_size_mat)) {
278 +
          lab <- paste0(lab, "<br>",
279 +
            point_size_name, ": ", label_format_fun(point_size_mat[, i])
280 +
          )
281 +
        }
282 +
        lab
274 283
      }
275 284
    )
276 285
    text_mat <- as.matrix(text_mat)
277 -
    if (!is.null(point_size_mat)) {
278 -
      text_mat <- paste0(
279 -
        text_mat, "<br>",
280 -
        point_size_name, ": ", label_format_fun(point_size_mat)
281 -
      )
282 -
    }
283 286
  }
284 287
285 288
  if (is.null(point_size_mat)) {

@@ -166,7 +166,7 @@
Loading
166 166
                     k_col = 1,
167 167
168 168
                     symm = FALSE,
169 -
                     revC = symm,
169 +
                     revC = symm || (is.dendrogram(Colv) & is.dendrogram(Rowv) & identical(Rowv, rev(Colv))),
170 170
171 171
                     ## data scaling
172 172
                     scale = c("none", "row", "column"),
@@ -227,11 +227,6 @@
Loading
227 227
    show_dendrogram <- rep(show_dendrogram, 2)
228 228
  }
229 229
230 -
  if (is.null(distfun_row)) distfun_row <- distfun
231 -
  if (is.null(hclustfun_row)) hclustfun_row <- hclustfun
232 -
  if (is.null(distfun_col)) distfun_col <- distfun
233 -
  if (is.null(hclustfun_col)) hclustfun_col <- hclustfun
234 -
235 230
  distfun_row <- match.fun(distfun_row)
236 231
  distfun_col <- match.fun(distfun_col)
237 232
@@ -365,15 +360,6 @@
Loading
365 360
  # TODO:  We may wish to change the defaults a bit in the future
366 361
  ## revC
367 362
  ## =======================
368 -
  if (is.null(revC)) {
369 -
    if (symm) {
370 -
      revC <- TRUE
371 -
    } else if (is.dendrogram(Colv) & is.dendrogram(Rowv) & identical(Rowv, rev(Colv))) {
372 -
      revC <- TRUE
373 -
    } else {
374 -
      revC <- FALSE
375 -
    }
376 -
  }
377 363
  if (revC) {
378 364
    Colv <- rev(Colv)
379 365
    colInd <- rev(colInd)

@@ -504,7 +504,7 @@
Loading
504 504
                              k_col = 1,
505 505
506 506
                              symm = FALSE,
507 -
                              revC = symm,
507 +
                              revC = symm || (is.dendrogram(Colv) & is.dendrogram(Rowv) & identical(Rowv, rev(Colv))),
508 508
509 509
                              ## data scaling
510 510
                              scale = c("none", "row", "column"),
Files Coverage
R 91.11%
Project Totals (9 files) 91.11%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading