From: Pierre Ratinaud Date: Mon, 24 Nov 2014 23:27:48 +0000 (+0100) Subject: ... X-Git-Url: http://iramuteq.org/git?a=commitdiff_plain;h=cda523e0d21bd5b05802643fcf83463db95d1da1;p=iramuteq ... --- 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 }