Skip to content

Commit

Permalink
Enhanced handling for output parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alephnull7 committed Feb 22, 2024
1 parent 3c1bd38 commit b7035c8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/visualizeWithRCircos.R
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,16 @@ getOutputFields <- function(output) {
outputTypes <- paste(getOutputTypes(), collapse = "|")
outputPattern <- sprintf("^(?:.+\\.)(%s)$", outputTypes)
outputMatch <- regexec(outputPattern, output, ignore.case = TRUE)
outputVec <- regmatches(output, outputMatch)[[1]]
outputVec <- regmatches(output, outputMatch)

if (length(outputVec) == 0) {
# non-char `output` or non-match for char `output`
if ((length(outputVec) == 0) || (length(outputVec[[1]]) == 0)) {
output <- NULL
outputType <- NULL
isOutput <- FALSE
} else {
output <- outputVec[1]
outputType <- tolower(outputVec[2])
output <- outputVec[[1]][1]
outputType <- tolower(outputVec[[1]][2])
isOutput <- TRUE
}

Expand Down

0 comments on commit b7035c8

Please sign in to comment.