From d535b8dff1cb541a177d8a88dd846f4b3d4d9d60 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Tue, 7 Nov 2023 10:59:25 +0100 Subject: [PATCH 01/24] Increment version number to 0.2.0.9000 --- DESCRIPTION | 2 +- NEWS.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 002b8bf..cdcb925 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: permChacko Title: Chacko Test for Order-Restriction with Permutation -Version: 0.2.0 +Version: 0.2.0.9000 Date: 2023-11-07 Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 2394f3a..1b5ac5c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,5 @@ +# permChacko (development version) + # permChacko 0.2.0 * Replaced `verbose` with `verbosity` in functions to allow for more control over the output ([issue #3](https://github.com/ocbe-uio/permChacko/issues/3)). From 4e51c15ecbec10027d911693dce6a5ca50918d44 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Tue, 7 Nov 2023 11:18:55 +0100 Subject: [PATCH 02/24] Added function to truncate long hypotheses (#11) --- R/print.R | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/R/print.R b/R/print.R index fe85ed9..03ff8d7 100644 --- a/R/print.R +++ b/R/print.R @@ -13,8 +13,8 @@ print.chacko_test <- function(x, ...) { " Numeric p-value : %f (%d permutations)\n", " Tabular p-value : %f\n" ), - paste0("p", seq_along(x$observed_data), collapse = " == "), - paste0("p", seq_along(x$observed_data), collapse = " <= "), + printHypothesis("p", seq_along(x$observed_data), "=="), + printHypothesis("p", seq_along(x$observed_data), "<="), x[["statistic"]], p_values[["analytic"]], p_values[["numeric"]], x[["n_perm"]], p_values[["tabular"]] ) @@ -35,3 +35,16 @@ print.reduced_vector <- function(x, details = TRUE, ...) { ) ) } + +printHypothesis <- function(x_name, x_indices, operator = "==") { + operator <- paste0(" ", operator, " ") + if (length(x_indices) < 6) { + return(paste0(x_name, x_indices, collapse = operator)) + } else { + first_idx <- 1:2 + last_idx <- seq(length(x_indices) - 1, length(x_indices)) + first_x <- paste0(x_name, x_indices[first_idx], collapse = operator) + last_x <- paste0(x_name, x_indices[last_idx], collapse = operator) + paste0(first_x, operator, "...", operator, last_x) + } +} From 463156bc68130b04562941e8f114df9d499e3598 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Tue, 7 Nov 2023 11:21:50 +0100 Subject: [PATCH 03/24] Updated NEWS --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 1b5ac5c..b20a6bc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # permChacko (development version) +* Improved printing of hypothesis ([issue #11](https://github.com/ocbe-uio/permChacko/issues/11)). + # permChacko 0.2.0 * Replaced `verbose` with `verbosity` in functions to allow for more control over the output ([issue #3](https://github.com/ocbe-uio/permChacko/issues/3)). From 08bae01fc02fa974723d945d3ddde376d35ec8a0 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Tue, 7 Nov 2023 12:08:46 +0100 Subject: [PATCH 04/24] Added unit tests (#11) --- tests/testthat/test-print-and-summary.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testthat/test-print-and-summary.R b/tests/testthat/test-print-and-summary.R index 8b6af4b..3303430 100644 --- a/tests/testthat/test-print-and-summary.R +++ b/tests/testthat/test-print-and-summary.R @@ -19,3 +19,7 @@ test_that("print.chacko_test() works as expected", { test_that("summary.reduced_vector() works as expected", { expect_output(summary(reduceVector(rpois(7, 7))), "has been reduced 3 times") }) +test_that("Hypothesis suppression works as expected", { + expect_output(print(permChacko(4:1)), "p1 == p2 == p3 == p4") + expect_output(print(permChacko(6:1)), "p1 == p2 == ... == p5 == p6") +}) From 3313e9cf48a349eb47edd51ec9e12e07d0a06806 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Mon, 13 Nov 2023 06:10:38 +0100 Subject: [PATCH 05/24] Added references to README --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0244f98..c05440e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # permChacko -permChacko is an R package that implements a modified version of the Chacko (1966) algorithm for order restriction. +permChacko is an R package that implements a modified version of the [Chacko (1966)](https://www.jstor.org/stable/25051572) algorithm for order restriction. ## Installation @@ -32,6 +32,12 @@ library(permChacko) permChacko(chacko66_sec3) # example 5 from Chacko (1966) ``` +## References + +Chacko, V. J. "Testing homogeneity against ordered alternatives." The Annals of Mathematical Statistics (1963): 945-956. https://www.jstor.org/stable/2238476 + +Chacko, V. J. (1966). Modified Chi-Square Test for Ordered Alternatives. Sankhyā: The Indian Journal of Statistics, Series B (1960-2002), 28(3/4), 185–190. http://www.jstor.org/stable/25051572 + ## Badges From b8c1b7b916890a232a0ac78e56eb38dd2f15abc4 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Jan 2024 12:54:02 +0100 Subject: [PATCH 06/24] Updated lifecycle badge --- README.md | 3 +-- vignettes/jss-submission.Rmd | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 vignettes/jss-submission.Rmd diff --git a/README.md b/README.md index c05440e..508bff5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - # permChacko permChacko is an R package that implements a modified version of the [Chacko (1966)](https://www.jstor.org/stable/25051572) algorithm for order restriction. @@ -41,7 +40,7 @@ Chacko, V. J. (1966). Modified Chi-Square Test for Ordered Alternatives. Sankhy ## Badges -[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) +[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![CodeFactor](https://www.codefactor.io/repository/github/ocbe-uio/permChacko/badge)](https://www.codefactor.io/repository/github/ocbe-uio/permChacko) [![R build status](https://github.com/ocbe-uio/permChacko/workflows/R-CMD-check/badge.svg)](https://github.com/ocbe-uio/permChacko/actions) [![Codecov](https://codecov.io/gh/ocbe-uio/permChacko/branch/develop/graph/badge.svg)](https://codecov.io/gh/ocbe-uio/permChacko) diff --git a/vignettes/jss-submission.Rmd b/vignettes/jss-submission.Rmd new file mode 100644 index 0000000..19228b1 --- /dev/null +++ b/vignettes/jss-submission.Rmd @@ -0,0 +1,5 @@ + + +# Motivation for this document: +# For R packages, we encourage inclusion of JSS submissions as vignettes in the package. +# Source: https://www.jstatsoft.org/authors and https://www.jstatsoft.org/guides/submission From 3c263d4c3f44c2f67e589be8eb3ce8ca5625cb5d Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Jan 2024 13:03:37 +0100 Subject: [PATCH 07/24] Delete vignettes/jss-submission.Rmd --- vignettes/jss-submission.Rmd | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 vignettes/jss-submission.Rmd diff --git a/vignettes/jss-submission.Rmd b/vignettes/jss-submission.Rmd deleted file mode 100644 index 19228b1..0000000 --- a/vignettes/jss-submission.Rmd +++ /dev/null @@ -1,5 +0,0 @@ - - -# Motivation for this document: -# For R packages, we encourage inclusion of JSS submissions as vignettes in the package. -# Source: https://www.jstatsoft.org/authors and https://www.jstatsoft.org/guides/submission From 685040c7b8739fe2e2454e85d2b53db4634ac474 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Thu, 7 Mar 2024 14:31:34 +0100 Subject: [PATCH 08/24] Increment version number to 0.2.0.9000-1709818294 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index cdcb925..ca98585 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: permChacko Title: Chacko Test for Order-Restriction with Permutation -Version: 0.2.0.9000 +Version: 0.2.0.9000-1709818294 Date: 2023-11-07 Authors@R: c( From 314c1236da5a6224a119516d671ef69acc346cb6 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 6 Mar 2024 11:16:46 +0100 Subject: [PATCH 09/24] Added calculation of alternative numeric p-value (#13) --- R/permChacko.R | 2 ++ R/print.R | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/R/permChacko.R b/R/permChacko.R index dffa7c0..8ddd3c6 100644 --- a/R/permChacko.R +++ b/R/permChacko.R @@ -53,6 +53,7 @@ permChacko <- function(x, n_perm = 1000L, verbosity = 0) { # The p-value is simply the fraction of such permutations that yield a test # statistic equal to or greater than the one we originally observed. perm_p_value <- sum(perm_chisq_bar >= chisq_bar) / n_perm + perm_p_value_le <- sum(perm_chisq_bar > chisq_bar) / n_perm m <- nrow(x_t) anal_p_value <- ifelse( test = m > 1L, @@ -70,6 +71,7 @@ permChacko <- function(x, n_perm = 1000L, verbosity = 0) { p_values <- c( "analytic" = anal_p_value, "numeric" = perm_p_value, + "numeric_alt" = perm_p_value_le, "tabular" = table_p_value ) out <- list( diff --git a/R/print.R b/R/print.R index 03ff8d7..39e68f2 100644 --- a/R/print.R +++ b/R/print.R @@ -10,13 +10,17 @@ print.chacko_test <- function(x, ...) { "Test statistic (chisq_bar): %f\n", "p-values:\n", " Analytic p-value : %f\n", - " Numeric p-value : %f (%d permutations)\n", + " Numeric p-value (<=) : %f (%d permutations)\n", + " Numeric p-value (<) : %f (%d permutations)\n", " Tabular p-value : %f\n" ), printHypothesis("p", seq_along(x$observed_data), "=="), printHypothesis("p", seq_along(x$observed_data), "<="), - x[["statistic"]], p_values[["analytic"]], - p_values[["numeric"]], x[["n_perm"]], p_values[["tabular"]] + x[["statistic"]], + p_values[["analytic"]], + p_values[["numeric"]], x[["n_perm"]], + p_values[["numeric_alt"]], x[["n_perm"]], + p_values[["tabular"]] ) ) } From b5b3b100fd1241df58aee11421e81d83d5531b20 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 6 Mar 2024 11:17:49 +0100 Subject: [PATCH 10/24] Adjusted unit test expectations (#13) --- tests/testthat/test-print-and-summary.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-print-and-summary.R b/tests/testthat/test-print-and-summary.R index 3303430..2a4e5fc 100644 --- a/tests/testthat/test-print-and-summary.R +++ b/tests/testthat/test-print-and-summary.R @@ -13,7 +13,7 @@ test_that("print.chacko_test() works as expected", { y <- permChacko(rpois(3, 5), n_perm = 30L) expect_output(print(y), "Test statistic \\(chisq_bar\\): 0\\.500000") expect_output(print(y), "Analytic p-value\\s+: 0\\.778801") - expect_output(print(y), "Numeric p-value\\s+: 0\\.400000 \\(30 permutation") + expect_output(print(y), "Numeric p-value.+: 0\\.400000 \\(30 permutation") expect_output(print(y), "Tabular p-value\\s+: 0\\.369550") }) test_that("summary.reduced_vector() works as expected", { From 7afc197dac03647cd2f0e17113a8b1e0ea56e49d Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 6 Mar 2024 11:18:45 +0100 Subject: [PATCH 11/24] Updated RoxygenNote version --- DESCRIPTION | 2 +- man/permChacko-package.Rd | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ca98585..5a4e2d1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,7 @@ Description: Implements an extension of the Chacko chi-square test for License: GPL (>= 3) Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Suggests: knitr, rmarkdown, diff --git a/man/permChacko-package.Rd b/man/permChacko-package.Rd index 81ad434..15b0513 100644 --- a/man/permChacko-package.Rd +++ b/man/permChacko-package.Rd @@ -3,7 +3,6 @@ \docType{package} \name{permChacko-package} \alias{permChacko-package} -\alias{_PACKAGE} \title{permChacko: Chacko Test for Order-Restriction with Permutation} \description{ Implements an extension of the Chacko chi-square test for ordered vectors (Chacko, 1966, \url{https://www.jstor.org/stable/25051572}). Our extension brings the Chacko test to the computer age by implementing a permutation test to offer a numeric estimate of the p-value, which is particularly useful when the analytic solution is not available. From bee262348e616e5ec51670cf477cd7219e90c226 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 5 Apr 2024 14:18:32 +0200 Subject: [PATCH 12/24] Added calculation of mid-P value (#13) --- R/permChacko.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/permChacko.R b/R/permChacko.R index 8ddd3c6..6ae6db2 100644 --- a/R/permChacko.R +++ b/R/permChacko.R @@ -54,6 +54,7 @@ permChacko <- function(x, n_perm = 1000L, verbosity = 0) { # statistic equal to or greater than the one we originally observed. perm_p_value <- sum(perm_chisq_bar >= chisq_bar) / n_perm perm_p_value_le <- sum(perm_chisq_bar > chisq_bar) / n_perm + perm_mid_p_value <- (sum(perm_chisq_bar > chisq_bar) + 0.5 * sum(perm_chisq_bar == chisq_bar)) / n_perm m <- nrow(x_t) anal_p_value <- ifelse( test = m > 1L, @@ -71,6 +72,7 @@ permChacko <- function(x, n_perm = 1000L, verbosity = 0) { p_values <- c( "analytic" = anal_p_value, "numeric" = perm_p_value, + "numeric_mid" = perm_mid_p_value, "numeric_alt" = perm_p_value_le, "tabular" = table_p_value ) From d062b0431d49d6ea7beb47e5b80e68b25a1e54ff Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 5 Apr 2024 14:26:43 +0200 Subject: [PATCH 13/24] Updated feature version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5a4e2d1..1968a3d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: permChacko Title: Chacko Test for Order-Restriction with Permutation -Version: 0.2.0.9000-1709818294 +Version: 0.2.0.9000-1712319977 Date: 2023-11-07 Authors@R: c( From 889691ae7498c0ebbd5039d70d40fc17007df28e Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 5 Apr 2024 14:34:27 +0200 Subject: [PATCH 14/24] Removed feature version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1968a3d..c798379 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: permChacko Title: Chacko Test for Order-Restriction with Permutation -Version: 0.2.0.9000-1712319977 +Version: 0.2.0.9000 Date: 2023-11-07 Authors@R: c( From abee50ba516258618649eeb012858367ddc6d3c7 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 5 Apr 2024 14:39:58 +0200 Subject: [PATCH 15/24] Removed alternative numeric p-value (#13) --- R/permChacko.R | 2 -- R/print.R | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/R/permChacko.R b/R/permChacko.R index 6ae6db2..9e7d84e 100644 --- a/R/permChacko.R +++ b/R/permChacko.R @@ -53,7 +53,6 @@ permChacko <- function(x, n_perm = 1000L, verbosity = 0) { # The p-value is simply the fraction of such permutations that yield a test # statistic equal to or greater than the one we originally observed. perm_p_value <- sum(perm_chisq_bar >= chisq_bar) / n_perm - perm_p_value_le <- sum(perm_chisq_bar > chisq_bar) / n_perm perm_mid_p_value <- (sum(perm_chisq_bar > chisq_bar) + 0.5 * sum(perm_chisq_bar == chisq_bar)) / n_perm m <- nrow(x_t) anal_p_value <- ifelse( @@ -73,7 +72,6 @@ permChacko <- function(x, n_perm = 1000L, verbosity = 0) { "analytic" = anal_p_value, "numeric" = perm_p_value, "numeric_mid" = perm_mid_p_value, - "numeric_alt" = perm_p_value_le, "tabular" = table_p_value ) out <- list( diff --git a/R/print.R b/R/print.R index 39e68f2..ff085ee 100644 --- a/R/print.R +++ b/R/print.R @@ -10,8 +10,8 @@ print.chacko_test <- function(x, ...) { "Test statistic (chisq_bar): %f\n", "p-values:\n", " Analytic p-value : %f\n", - " Numeric p-value (<=) : %f (%d permutations)\n", - " Numeric p-value (<) : %f (%d permutations)\n", + " Numeric p-value : %f (%d permutations)\n", + " Numeric mid-p value : %f (%d permutations)\n", " Tabular p-value : %f\n" ), printHypothesis("p", seq_along(x$observed_data), "=="), @@ -19,7 +19,7 @@ print.chacko_test <- function(x, ...) { x[["statistic"]], p_values[["analytic"]], p_values[["numeric"]], x[["n_perm"]], - p_values[["numeric_alt"]], x[["n_perm"]], + p_values[["numeric_mid"]], x[["n_perm"]], p_values[["tabular"]] ) ) From b3d139f118bda6d095547154aa688ad5ab98debb Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 5 Apr 2024 14:41:07 +0200 Subject: [PATCH 16/24] Increment version number to 0.2.0.9001 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index c798379..4dde8b7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: permChacko Title: Chacko Test for Order-Restriction with Permutation -Version: 0.2.0.9000 +Version: 0.2.0.9001 Date: 2023-11-07 Authors@R: c( From fe1783471b7d314f3e3d45d446980cc8f94b0bdf Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 5 Apr 2024 14:43:04 +0200 Subject: [PATCH 17/24] Updated NEWS.md --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index b20a6bc..df051bd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # permChacko (development version) * Improved printing of hypothesis ([issue #11](https://github.com/ocbe-uio/permChacko/issues/11)). +* Added calculation of mid-P values ([issue #13](https://github.com/ocbe-uio/permChacko/issues/13)). # permChacko 0.2.0 From 1f1fa4ce960450132fa84fa1ba3ea5781b8d8681 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Apr 2024 09:55:49 +0200 Subject: [PATCH 18/24] Solved lints --- R/permChacko.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/R/permChacko.R b/R/permChacko.R index 9e7d84e..e7afd6e 100644 --- a/R/permChacko.R +++ b/R/permChacko.R @@ -52,8 +52,11 @@ permChacko <- function(x, n_perm = 1000L, verbosity = 0) { # The p-value is simply the fraction of such permutations that yield a test # statistic equal to or greater than the one we originally observed. - perm_p_value <- sum(perm_chisq_bar >= chisq_bar) / n_perm - perm_mid_p_value <- (sum(perm_chisq_bar > chisq_bar) + 0.5 * sum(perm_chisq_bar == chisq_bar)) / n_perm + sum_eq <- sum(perm_chisq_bar == chisq_bar) + sum_gt <- sum(perm_chisq_bar > chisq_bar) + sum_gte <- sum(perm_chisq_bar >= chisq_bar) + perm_p_value <- sum_gte / n_perm + perm_mid_p_value <- (sum_gt + 0.5 * sum_eq) / n_perm m <- nrow(x_t) anal_p_value <- ifelse( test = m > 1L, From de9b92b94da86334e30e8208d17d5faeab10f8d0 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Apr 2024 09:56:29 +0200 Subject: [PATCH 19/24] Increment version number to 1.0.0 --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4dde8b7..7d3fc82 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: permChacko Title: Chacko Test for Order-Restriction with Permutation -Version: 0.2.0.9001 +Version: 1.0.0 Date: 2023-11-07 Authors@R: c( diff --git a/NEWS.md b/NEWS.md index df051bd..0be480a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# permChacko (development version) +# permChacko 1.0.0 * Improved printing of hypothesis ([issue #11](https://github.com/ocbe-uio/permChacko/issues/11)). * Added calculation of mid-P values ([issue #13](https://github.com/ocbe-uio/permChacko/issues/13)). From 105fe2cfbef01a9835e60bc6a9a75cb164560950 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Apr 2024 09:57:32 +0200 Subject: [PATCH 20/24] Trigger CI on release candidates --- .github/workflows/check-standard.yaml | 4 ++-- .github/workflows/lint.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 7b32d11..26e5bf4 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -2,9 +2,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [develop, release] + branches: [develop, release*] pull_request: - branches: [develop, release] + branches: [develop, release*] name: R-CMD-check diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 5cbf71e..ef3fff4 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -2,9 +2,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [develop, release, fix-linter] + branches: [develop, release*, fix-linter] pull_request: - branches: [develop, release] + branches: [develop, release*] name: lint From c31742483bffa114192167157e70e5077dc527e2 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Apr 2024 10:10:35 +0200 Subject: [PATCH 21/24] Added rhub YAML As recommended by `?rhubv2`. --- .github/workflows/rhub.yaml | 95 +++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/rhub.yaml diff --git a/.github/workflows/rhub.yaml b/.github/workflows/rhub.yaml new file mode 100644 index 0000000..74ec7b0 --- /dev/null +++ b/.github/workflows/rhub.yaml @@ -0,0 +1,95 @@ +# R-hub's generic GitHub Actions workflow file. It's canonical location is at +# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml +# You can update this file to a newer version using the rhub2 package: +# +# rhub::rhub_setup() +# +# It is unlikely that you need to modify this file manually. + +name: R-hub +run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}" + +on: + workflow_dispatch: + inputs: + config: + description: 'A comma separated list of R-hub platforms to use.' + type: string + default: 'linux,windows,macos' + name: + description: 'Run name. You can leave this empty now.' + type: string + id: + description: 'Unique ID. You can leave this empty now.' + type: string + +jobs: + + setup: + runs-on: ubuntu-latest + outputs: + containers: ${{ steps.rhub-setup.outputs.containers }} + platforms: ${{ steps.rhub-setup.outputs.platforms }} + + steps: + # NO NEED TO CHECKOUT HERE + - uses: r-hub/actions/setup@v1 + with: + config: ${{ github.event.inputs.config }} + id: rhub-setup + + linux-containers: + needs: setup + if: ${{ needs.setup.outputs.containers != '[]' }} + runs-on: ubuntu-latest + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.containers) }} + container: + image: ${{ matrix.config.container }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/run-check@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + + other-platforms: + needs: setup + if: ${{ needs.setup.outputs.platforms != '[]' }} + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.platforms) }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/setup-r@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/run-check@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} From cb06c94d9aa0c6f5a756ebf6a4639279737fc364 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Apr 2024 10:55:56 +0200 Subject: [PATCH 22/24] Updated date --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7d3fc82..9cc617a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: permChacko Title: Chacko Test for Order-Restriction with Permutation Version: 1.0.0 -Date: 2023-11-07 +Date: 2024-04-17 Authors@R: c( person( From 6a30f4384d9d15cb292b9d25e45a868477d30606 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Apr 2024 11:04:25 +0200 Subject: [PATCH 23/24] Updated `cran-comments.md` Using `packager::provide_cran_comments()`. --- cran-comments.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 858617d..f2b658c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,19 @@ -## R CMD check results +Dear CRAN Team, +this is a resubmission of package 'permChacko'. I have added the following changes: -0 errors | 0 warnings | 1 note +* Improved printing of hypothesis ([issue #11](https://github.com/ocbe-uio/permChacko/issues/11)). +* Added calculation of mid-P values ([issue #13](https://github.com/ocbe-uio/permChacko/issues/13)). -* This is a new release. +Please upload to CRAN. +Best, Waldir + +# Package permChacko 1.0.0 + +Reporting is done by packager version 1.15.2 + +## Test environments +- R version 4.3.1 (2023-06-16) + Platform: x86_64-pc-linux-gnu (64-bit) + Running under: Ubuntu 23.10 + ERROR: No check log found! +- win-builder (devel) From 33d0cbba850399352dff8c223ceb883bbbe95202 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 17 Apr 2024 11:05:39 +0200 Subject: [PATCH 24/24] Updated `CRAN-SUBMISSION` This is the output of `devtools::release()` --- CRAN-SUBMISSION | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index 6f75bf0..9e54004 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 0.2.0 -Date: 2023-11-07 08:27:25 UTC -SHA: 543f1ca2fb82489effd0178f2be3f9fec5e9f68b +Version: 1.0.0 +Date: 2024-04-17 09:04:51 UTC +SHA: 6a30f4384d9d15cb292b9d25e45a868477d30606