Skip to content

Commit

Permalink
fix for #30
Browse files Browse the repository at this point in the history
  • Loading branch information
kassambara committed Apr 4, 2017
1 parent 802b3a8 commit 2c5fe9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Expand Up @@ -3,6 +3,7 @@
## Bug fixes

- Now, the argument `invisible` works properly in the function `fviz_pca_biplot()`([@ginolhac, #26](https://github.com/kassambara/factoextra/issues/26)).
- The function `fviz_dend()` now works for an object of class `diana` ([@qfazille, #30](https://github.com/kassambara/factoextra/issues/30)).

## Minor changes

Expand Down
3 changes: 2 additions & 1 deletion R/fviz_dend.R
Expand Up @@ -131,7 +131,8 @@ fviz_dend <- function(x, k = NULL, h = NULL, k_colors = NULL, palette = NULL, s
method <- ""
}
else stop("Can't handle an object of class ", paste(class(x), collapse =", ") )
if(is.na(method)) method <- ""
if(is.null(method)) method <- ""
else if(is.na(method)) method <- ""
if(is.null(sub) & method!="") sub = paste0("Method: ", method)

if(!is.null(dendextend::labels_cex(dend))) cex <- dendextend::labels_cex(dend)
Expand Down

0 comments on commit 2c5fe9c

Please sign in to comment.