Skip to content

Commit

Permalink
Merge branch 'release-1.0.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Apr 17, 2024
2 parents 2af89f6 + 33d0cbb commit 383e0a3
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-standard.yaml
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Expand Up @@ -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

Expand Down
95 changes: 95 additions & 0 deletions .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 }}
6 changes: 3 additions & 3 deletions 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
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: permChacko
Title: Chacko Test for Order-Restriction with Permutation
Version: 0.2.0.9001
Date: 2023-11-07
Version: 1.0.0
Date: 2024-04-17
Authors@R:
c(
person(
Expand Down
2 changes: 1 addition & 1 deletion 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)).
Expand Down
7 changes: 5 additions & 2 deletions R/permChacko.R
Expand Up @@ -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,
Expand Down
20 changes: 17 additions & 3 deletions 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)

0 comments on commit 383e0a3

Please sign in to comment.