Skip to content

Commit

Permalink
Merge branch 'develop' into paper
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Nov 7, 2023
2 parents 3dd0e8c + a84b408 commit 2329cdf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: permChacko
Title: Chacko Test for Order-Restriction with Permutation
Version: 0.1.0.9013
Version: 0.1.0.9014
Authors@R:
c(
person(
Expand Down
4 changes: 2 additions & 2 deletions R/orderingProcess.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ orderingProcess <- function(x_t, verbosity = 0) {

if (verbosity >= 2L && i < length(x) - 1L) {
message("\nNew values and weights")
print(t(cbind("x" = x, "t" = t)))
print(cbind("x" = x, "t" = t))
}
}
i <- i + 1L
}
out <- cbind("x" = x, "t" = t)
if (verbosity >= 1L) {
message("\n\nFinal vector")
print(t(out))
print(out)
}
return(out)
}
2 changes: 1 addition & 1 deletion R/reduceVector.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ reduceVector <- function(x, verbosity = 0L) {
while (nrow(x_t) > 1L && isMonotoneIncreasing(x_t[, "x"])) {
if (verbosity >= 1L) {
message("Vector needs reduction\nInitial vector")
print(t(x_t))
print(x_t)
}
reductions <- reductions + 1L
x_t <- orderingProcess(x_t, verbosity)
Expand Down
3 changes: 1 addition & 2 deletions tests/testthat/test-print-and-summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ set.seed(778566)
test_that("print.reduced_vector() works as expected", {
expect_output(reduceVector(rpois(13, 8)), NA)
expect_output(
suppressMessages(reduceVector(rpois(11, 8), verbosity = 1)),
"8\\.00 1 2\\.0"
suppressMessages(reduceVector(rpois(11, 8), verbosity = 1)), "7\\.25 8"
)
x <- reduceVector(rpois(6, 6))
expect_output(print(x), "Reduced vector : 4\\t4\\t4\\t5\\t8")
Expand Down

0 comments on commit 2329cdf

Please sign in to comment.