X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=Rscripts%2FRgraph.R;h=a00a186437b613db51ace8f004ba6a0033928ed1;hp=8cc1c23e3a50d113c55bfa98a9cd4f7f1be39121;hb=4c959afafbe1f1ec29b01fa8db3ae1af1b8cd4cf;hpb=3647a911117ea08f4f969720a16c58bcc7d4e809 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 }