Skip to content

Commit

Permalink
Correct example & added length-1 reducedDim slot autodetection
Browse files Browse the repository at this point in the history
  • Loading branch information
seraidarian committed Jul 30, 2024
1 parent b1e961a commit 0dd1659
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/plotLoadings.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
#'
#' # Plotting after performing LDA method
#' tse <- addLDA(tse)
#' plotLoadings(tse, dim = "LDA")
#' plotLoadings(tse, dimred = "LDA", ncomponents = 2)
NULL

#' @rdname plotLoadings
Expand All @@ -109,8 +109,11 @@ setMethod("plotLoadings", signature = c(x = "TreeSummarizedExperiment"),
tree.name = "phylo",
class = rownames(x),
...) {

if (length(reducedDimNames(x)) == 1) {
dimred <- reducedDimNames(x)
}


# Making sure there is no error in parameters given by the user
.check_parameters(x,
dimred = dimred,
Expand Down

0 comments on commit 0dd1659

Please sign in to comment.