Skip to content

Commit

Permalink
Fix for Issue #178
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-Bladen committed Mar 8, 2022
1 parent 8fc6d96 commit dc5f798
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/circosPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,13 @@ circosPlot.block.splsda <- .circosPlot
#' @export
circosPlot.block.spls <- function(object, ..., group = NULL, Y.name = 'Y')
{
# when a block.spls object is supplied that uses the indY parameter, the name
# of the object$X component for this dataframe is its proper name
# for below checks, change it back to "Y"
if (is.null(object$X$Y)) {
names(object$X)[object$indY] <- "Y"
}

if (length(group) != nrow(object$X$Y))
stop("group must be a factor of length: nrow(object$X$Y) = ", nrow(object$X$Y), "\n")
object$Y <- factor(group)
Expand Down

0 comments on commit dc5f798

Please sign in to comment.