Browse code

set km to 1 if it is null

Zuguang Gu authored on 26/02/2019 20:48:31
Showing1 changed files

... ...
@@ -351,8 +351,10 @@ Heatmap = function(matrix, col, name,
351 351
 
352 352
     ### normalize km/split and row_km/row_split
353 353
     if(missing(row_km)) row_km = km
354
+    if(is.null(row_km)) row_km = 1
354 355
     if(missing(row_split)) row_split = split
355 356
     if(missing(row_gap)) row_gap = gap
357
+    if(is.null(column_km)) column_km = 1
356 358
 
357 359
     ####### zero and one column matrix ########
358 360
     if(ncol(matrix) == 0 || nrow(matrix) == 0) {