diff --git a/R/set.dendrogram.R b/R/set.dendrogram.R index e87b38b0..eb8c2922 100644 --- a/R/set.dendrogram.R +++ b/R/set.dendrogram.R @@ -72,8 +72,9 @@ #' @param value an object with the value to set in the dendrogram tree. #' (the type of the value depends on the "what") #' @param order_value logical. Default is FALSE. If TRUE, it means the order of -#' the value is in the order of the data which produced the \link{hclust} or \link{dendrogram} - -#' and will reorder the value to conform with the order of the labels in the dendrogram. +#' the value is in the order of the data which produced the \link{hclust} +#' or \link{dendrogram} - and will reorder the value to conform with the order +#' of the labels in the dendrogram. #' @param ... passed to the specific function for more options. #' @param which an integer vector indicating, in the case "dend" is #' a dendlist, on which of the trees should the modification be performed. @@ -210,9 +211,11 @@ #' plot #' #' #---- using order_value -#' # This is probably not what you want, since cutree returns clusters in the order of the original data: +#' # This is probably not what you want, since cutree +#' # returns clusters in the order of the original data: #' dend %>% set("labels_colors", cutree(dend, k = 3)) %>% plot -#' # The way to fix it, is to use order_value = TRUE so that value is assumed to be in the order of the data: +#' # The way to fix it, is to use order_value = TRUE +#' # so that value is assumed to be in the order of the data: #' dend %>% set("labels_colors", cutree(dend, k = 3), order_value = TRUE) %>% plot #' #' diff --git a/man/set.Rd b/man/set.Rd index d00691e8..36758452 100644 --- a/man/set.Rd +++ b/man/set.Rd @@ -54,8 +54,9 @@ for the different options)} (the type of the value depends on the "what")} \item{order_value}{logical. Default is FALSE. If TRUE, it means the order of -the value is in the order of the data which produced the \link{hclust} or \link{dendrogram} - -and will reorder the value to conform with the order of the labels in the dendrogram.} +the value is in the order of the data which produced the \link{hclust} +or \link{dendrogram} - and will reorder the value to conform with the order +of the labels in the dendrogram.} \item{which}{an integer vector indicating, in the case "dend" is a dendlist, on which of the trees should the modification be performed. @@ -185,9 +186,11 @@ dend \%>\% plot #---- using order_value -# This is probably not what you want, since cutree returns clusters in the order of the original data: +# This is probably not what you want, since cutree +# returns clusters in the order of the original data: dend \%>\% set("labels_colors", cutree(dend, k = 3)) \%>\% plot -# The way to fix it, is to use order_value = TRUE so that value is assumed to be in the order of the data: +# The way to fix it, is to use order_value = TRUE +# so that value is assumed to be in the order of the data: dend \%>\% set("labels_colors", cutree(dend, k = 3), order_value = TRUE) \%>\% plot