Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

101: Create hex logo for simIDM and prepare for CRAN release [skip vbump] #102

Merged
merged 15 commits into from
Dec 11, 2023
Merged
24 changes: 11 additions & 13 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ name: Check 🛠
on:
pull_request:
branches:
- main
- pre-release
- opened
- synchronize
- ready_for_review
push:
branches:
- main
- pre-release
workflow_dispatch:

jobs:
audit:
Expand All @@ -28,29 +29,30 @@ jobs:
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
linter:
if: github.event_name != 'push'
if: github.event_name == 'pull_request'
name: SuperLinter 🦸‍♀️
uses: insightsengineering/r.pkg.template/.github/workflows/linter.yaml@main
roxygen:
name: Roxygen 🅾
uses: insightsengineering/r.pkg.template/.github/workflows/roxygen.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
auto-update: true
gitleaks:
name: gitleaks 💧
uses: insightsengineering/r.pkg.template/.github/workflows/gitleaks.yaml@main
spelling:
if: github.event_name == 'pull_request'
name: Spell Check 🆎
uses: insightsengineering/r.pkg.template/.github/workflows/spelling.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
links:
if: github.event_name != 'push'
if: github.event_name == 'pull_request'
name: Check URLs 🌐
uses: insightsengineering/r.pkg.template/.github/workflows/links.yaml@main
vbump:
name: Version Bump 🤜🤛
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event_name == 'push'
uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
Expand All @@ -61,12 +63,8 @@ jobs:
name: License Check 🃏
uses: insightsengineering/r.pkg.template/.github/workflows/licenses.yaml@main
style:
if: github.event_name != 'push'
if: github.event_name == 'pull_request'
name: Style Check 👗
uses: insightsengineering/r.pkg.template/.github/workflows/style.yaml@main
with:
auto-update: true
grammar:
if: github.event_name != 'push'
name: Grammar Check 🔤
uses: insightsengineering/r.pkg.template/.github/workflows/grammar.yaml@main
23 changes: 4 additions & 19 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,17 @@ on:
push:
branches:
- main
paths:
- inst/templates/**
- _pkgdown.*
- DESCRIPTION
- '**.md'
- man/**
- LICENSE.*
- NAMESPACE
pull_request:
branches:
- main
- pre-release
paths:
- inst/templates/**
- _pkgdown.*
- DESCRIPTION
- '**.md'
- man/**
- LICENSE.*
- NAMESPACE
workflow_dispatch:

jobs:
docs:
name: Pkgdown Docs 📚
uses: insightsengineering/r.pkg.template/.github/workflows/pkgdown.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
refs-order: c("latest-tag", "main")
default-landing-page: latest-tag
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 0 additions & 15 deletions .github/workflows/post-release.yaml

This file was deleted.

33 changes: 26 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,43 @@ on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
release:
name: Create release 🎉
uses: insightsengineering/r.pkg.template/.github/workflows/release.yaml@main
permissions:
contents: write
r-cmd:
name: R CMD Check 🧬
needs: [release, docs]
uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
additional-r-cmd-check-params: --as-cran
coverage:
name: Coverage 📔
needs: [release, docs]
uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
name: Build package 🎁
needs: release
uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
skip-r-cmd-check: true
skip-r-cmd-install: true
docs:
name: Pkgdown Docs 📚
needs: release
uses: insightsengineering/r.pkg.template/.github/workflows/pkgdown.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
refs-order: c("latest-tag", "main")
default-landing-page: latest-tag
release:
name: Create release 🎉
uses: insightsengineering/r.pkg.template/.github/workflows/release.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Scheduled 🕰️

on:
schedule:
- cron: '45 3 * * 0'
workflow_dispatch:

jobs:
cran-status:
name: CRAN Status Monitor 📺
uses: insightsengineering/r.pkg.template/.github/workflows/cran-status.yaml@main
with:
issue-assignees: "niessl,danielinteractive"
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Type: Package
Package: simIDM
Title: Simulating Oncology Trials using an Illness-Death Model
Version: 0.0.5.9026
Version: 0.1.0
Authors@R: c(
person("Alexandra", "Erdmann", , "alexandra.erdmann@uni-ulm.de", role = c("aut", "cre")),
person("Kaspar", "Rufibach", , "kaspar.rufibach@roche.com", role = "aut"),
person("Holger", "Loewe", , "holger.loewe@roche.com", role = "aut"),
person("Daniel", "Sabanes Bove", , "daniel.sabanes_bove@roche.com", role = "aut"),
person("Holger", "Löwe", , "holger.loewe@roche.com", role = "aut"),
danielinteractive marked this conversation as resolved.
Show resolved Hide resolved
person("Daniel", "Sabanés Bové", , "daniel.sabanes_bove@roche.com", role = "aut"),
person("F. Hoffmann-La Roche AG", role = c("cph", "fnd")),
person("University of Ulm", role = c("cph", "fnd"))
)
Expand All @@ -17,7 +17,7 @@ Description: Based on the illness-death model a large number of clinical
for random and event-driven censoring, an arbitrary number of
treatment arms, staggered study entry and drop-out. Exponentially,
Weibull and piecewise exponentially distributed survival times can be
generated.
generated. The correlation between PFS and OS can be calculated.
License: Apache License 2.0
URL: https://github.com/insightsengineering/simIDM/
BugReports: https://github.com/insightsengineering/simIDM/issues
Expand Down
11 changes: 5 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# simIDM 0.0.5.9026
# simIDM 0.1.0

### New Features

- `prepareData` allows formatting of trial data for log-likelihood computation.
- `estimateParams` estimates parameters of exponential and Weibull transition hazards for a given data set.
- `estimateParams` estimates parameters of exponential and Weibull transition hazards using maximum likelihood for a given data set after using `prepareData`.
- `corTrans` calculates the correlation between PFS and OS for a given set of transition hazards, and `corPFSOS` estimates this correlation for a given data set, optionally with a bootstrap based confidence interval.

### Bug Fixes

- `ExpSurvOS` now returns 0 instead of NaN for large values of t.
- `WeibSurvOS` now does not return an error for large values of t.
- `PWCSurvOS` now does not return an error for large values of t.
- `PWCSurvOS` no longer returns values larger than 1, and is significantly faster, based on a closed form calculation instead of numerical integration.
- `PWCSurvOS` now does not return an error for large values of t. It also no longer returns values larger than 1. It is significantly faster, based on a closed form calculation instead of numerical integration.
- `getSimulatedData` now also works when there are no transitions from progression to death, similarly for `getOneClinicalTrial` (which now warns if there are no such transitions at all).

### Miscellaneous

- Renamed piecewise constant hazards function to `getPWCHazard` (previously `getPCWHazard`).
- `PwcOSInt`, `integrateVector`, `WeibOSInteg` are no longer exported, and only used internally.
- Renamed piecewise constant hazards function to `getPWCHazard` (previously `getPCWHazard`).

# simIDM 0.0.5

Expand Down
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- markdownlint-disable-file -->
<!-- README.md needs to be generated from README.Rmd. Please edit that file -->

# simIDM
# simIDM <img src="man/figures/logo.png" align="right" height="139" />

<!-- badges: start -->

Expand Down Expand Up @@ -32,13 +32,16 @@ illness-death model, which can be used for trail planning, for example.
The simulation set-up allows random and event-driven censoring, an
arbitrary number of treatment arms, staggered study entry and drop-out.
Exponentially, Weibull and piecewise exponentially distributed survival
times can be generated.
times can be generated. In addition, the correlation between PFS and OS
can be calculated based on the simulation scenario, or estimated from a
given data set.

**Scope:**

- Simulation of the illness-death model with constant, Weibull or
piecewise constant transition hazards.
- Conversion of the transition times to PFS and OS survival times.
- Correlation between PFS and OS survival times can be calculated.

**Main Features:**

Expand All @@ -49,18 +52,21 @@ times can be generated.
- Arbitrary number of treatment arms and flexible randomization ratio.
- Staggered study entry.
- Derivation of PFS and OS survival functions from transition hazards.
- Correlation between PFS and OS can be estimated from a given data set.

## Installation

<!-- **CRAN** -->
<!-- You can install the current stable version from CRAN with: -->
<!-- ```{r cran-installation, eval = FALSE} -->
<!-- install.packages("mmrm") -->
<!-- ``` -->
### Release

**GitHub**
You can install the current release version from *CRAN* with:

You can install the current development version from GitHub with:
``` r
install.packages("simIDM")
```

### Development

You can install the current development version from *GitHub* with:

``` r
if (!require("remotes")) {
Expand All @@ -71,8 +77,9 @@ remotes::install_github("insightsengineering/simIDM")

## Getting Started

See also the `quickstart` vignette or get started by trying out the
example:
See also the [quick
start](https://insightsengineering.github.io/simIDM/latest-tag/articles/quickstart.html)
vignette or get started by trying out this example:

``` r
library(simIDM)
Expand Down
23 changes: 13 additions & 10 deletions README.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ output: github_document
<!-- markdownlint-disable-file -->
<!-- README.md needs to be generated from README.Rmd. Please edit that file -->

# simIDM
# simIDM <img src="man/figures/logo.png" align="right" height="139" />

```{r, echo = FALSE}
knitr::opts_chunk$set(
Expand Down Expand Up @@ -33,11 +33,13 @@ assumption of proportional hazards. This package provides the tools to simulate
endpoints OS and PFS based on the illness-death model, which can be used for trail planning, for example. The simulation
set-up allows random and event-driven censoring, an arbitrary number of treatment arms, staggered study entry and drop-out.
Exponentially, Weibull and piecewise exponentially distributed survival times can be generated.
In addition, the correlation between PFS and OS can be calculated based on the simulation scenario, or estimated from a given data set.

**Scope:**

* Simulation of the illness-death model with constant, Weibull or piecewise constant transition hazards.
* Conversion of the transition times to PFS and OS survival times.
* Correlation between PFS and OS survival times can be calculated.

**Main Features:**

Expand All @@ -46,20 +48,21 @@ Exponentially, Weibull and piecewise exponentially distributed survival times ca
* Arbitrary number of treatment arms and flexible randomization ratio.
* Staggered study entry.
* Derivation of PFS and OS survival functions from transition hazards.
* Correlation between PFS and OS can be estimated from a given data set.

## Installation

<!-- **CRAN** -->
### Release

<!-- You can install the current stable version from CRAN with: -->
You can install the current release version from *CRAN* with:

<!-- ```{r cran-installation, eval = FALSE} -->
<!-- install.packages("mmrm") -->
<!-- ``` -->
```{r cran-installation, eval = FALSE}
install.packages("simIDM")
```

**GitHub**
### Development

You can install the current development version from GitHub with:
You can install the current development version from *GitHub* with:

```{r gh-installation, eval = FALSE}
if (!require("remotes")) {
Expand All @@ -70,9 +73,9 @@ remotes::install_github("insightsengineering/simIDM")

## Getting Started

See also the `quickstart` vignette or get started by trying out the example:
See also the [quick start](https://insightsengineering.github.io/simIDM/latest-tag/articles/quickstart.html) vignette or get started by trying out this example:

```{r getting-started}
```{r getting-started, results = 'hide'}
library(simIDM)
transitionGroup1 <- exponential_transition(h01 = 1.2, h02 = 1.5, h12 = 1.6)
transitionGroup2 <- exponential_transition(h01 = 1, h02 = 1.3, h12 = 1.7)
Expand Down
Loading