Skip to content

Commit

Permalink
Merge branch 'devel' into plotabundance_mods
Browse files Browse the repository at this point in the history
  • Loading branch information
TuomasBorman authored Nov 1, 2024
2 parents 99803e1 + 9eee9d7 commit 146af91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: miaViz
Title: Microbiome Analysis Plotting and Visualization
Version: 1.13.15
Version: 1.15.1
Authors@R:
c(person(given = "Tuomas", family = "Borman", role = c("aut", "cre"),
email = "tuomas.v.borman@utu.fi",
Expand Down
7 changes: 6 additions & 1 deletion R/plotCCA.R
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,16 @@ setMethod("plotRDA", signature = c(x = "matrix"),
}

# Get data for vectors
# There must be at least two constrained axis to plot vectors. If there are
# not, give warning.
vector_data <- NULL
if( add.vectors ){
if( add.vectors && ncol(rda$CCA$biplot) > 1 ){
vector_data <- rda$CCA$biplot
vector_data <- as.data.frame(vector_data)
vector_data[["group"]] <- rownames(vector_data)
} else if( add.vectors ){
warning("Model contains only one constrained axis. Vectors cannot ",
"be added.", call. = FALSE)
}

# Get variable names from sample metadata
Expand Down

0 comments on commit 146af91

Please sign in to comment.