diff --git a/DESCRIPTION b/DESCRIPTION index 7b6e2e6..bc3bd06 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,14 +15,7 @@ Description: Provide flexible native clustering routines that can be License: MIT + file LICENSE Depends: R (>= 2.12.0), Rcpp (>= 0.10.4) LinkingTo: Rcpp, RcppEigen -Suggests: - RUnit, - rbenchmark, - fastcluster, - inline, - knitr, - rmarkdown, - covr +Suggests: RUnit, rbenchmark, fastcluster, inline, knitr, markdown, rmarkdown, covr URL: https://github.com/nolanlab/Rclusterpp BugReports: https://github.com/nolanlab/Rclusterpp/issues NeedsCompilation: yes diff --git a/R/Rclusterpp.hclust.R b/R/Rclusterpp.hclust.R index 66d466b..04e4da9 100644 --- a/R/Rclusterpp.hclust.R +++ b/R/Rclusterpp.hclust.R @@ -20,6 +20,7 @@ Rclusterpp.hclust <- function(x, method="ward", members=NULL, distance="euclidea if (method == -1) stop("Ambiguous clustering method") + if (inherits(x, "dist")) { dist.method = attributes(x)$method labels = attributes(x)$Labels