From cda523e0d21bd5b05802643fcf83463db95d1da1 Mon Sep 17 00:00:00 2001 From: Pierre Ratinaud Date: Tue, 25 Nov 2014 00:27:48 +0100 Subject: [PATCH] ... --- Rscripts/Rgraph.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Rscripts/Rgraph.R b/Rscripts/Rgraph.R index 8cc1c23..a00a186 100644 --- a/Rscripts/Rgraph.R +++ b/Rscripts/Rgraph.R @@ -628,7 +628,10 @@ plot.dendro.prof <- function(tree, classes, chisqtable, nbbycl = 60, type.dendro names(ntoplot) <- rownames(toplot) ntoplot <- ntoplot[order(ntoplot, decreasing = TRUE)] ntoplot <- round(ntoplot, 0) - ntoplot <- ntoplot[1:nbbycl] + if (length(toplot) > nbbycl) { + ntoplot <- ntoplot[1:nbbycl] + } + ntoplot <- ntoplot[which(ntoplot > 0)] #ntoplot <- ntoplot[order(ntoplot)] #ntoplot <- ifelse(length(ntoplot) > nbbycl, ntoplot[1:nbbycl], ntoplot) lclasses[[classe]] <- ntoplot @@ -696,7 +699,7 @@ plot.dendro.cloud <- function(tree, classes, chisqtable, nbbycl = 60, type.dendr ntoplot <- ntoplot[1:nbbycl] } ntoplot <- ntoplot[order(ntoplot)] - ntoplot <- which(ntoplot > 0) + ntoplot <- ntoplot[which(ntoplot > 0)] #ntoplot <- ifelse(length(ntoplot) > nbbycl, ntoplot[1:nbbycl], ntoplot) lclasses[[classe]] <- ntoplot } -- 2.7.4