Browse code

dimension is correctly kept when subsetting the array

jokergoo authored on 06/11/2015 11:56:49
Showing 1 changed files

... ...
@@ -226,8 +226,8 @@ oncoPrint = function(mat, get_type = function(x) x,
226 226
 	#####################################################################
227 227
 	# the main matrix
228 228
 	pheudo = c(all_type, rep(NA, nrow(arr)*ncol(arr) - length(all_type)))
229
-	dim(pheudo) = dim(arr[, , 1])
230
-	dimnames(pheudo) = dimnames(arr[, , 1])
229
+	dim(pheudo) = dim(arr)[1:2]
230
+	dimnames(pheudo) = dimnames(arr)[1:2]
231 231
 	
232 232
 	if(show_column_barplot) {
233 233
 		ht = Heatmap(pheudo, col = col, rect_gp = gpar(type = "none"),