Skip to content

Commit

Permalink
Updating vignettes (#20)
Browse files Browse the repository at this point in the history
* Adding hexagon and correct typos in readme

* Fixing bug in table in documentation

* Rearranging examples

* Adding brackets around package names and other minor adjustments

* Minor

* Minor

* Adding dependency {crew}

* Reverting modification of description file

* Sort snapshot results

* Reordering snapshot
  • Loading branch information
nsjohnsen committed Apr 4, 2024
1 parent 6a4c1f1 commit 9d3d10f
Show file tree
Hide file tree
Showing 19 changed files with 153 additions and 166 deletions.
20 changes: 9 additions & 11 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
always_allow_html: true
---

<!-- README.md is generated from README.Rmd. Please edit that file -->
# ramnog <a href="https://hta-pharma.github.io/ramnog/"><img src="man/figures/logo.png" align="right" height="138" alt="ramnog website" /></a>

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# R packages for AMNOG analyses

Ramnog is a collection of packages for setting up pipelines for AMNOG-style HTA analyses

The aim of ramnog is that statistician/programmer can set up an AMNOG-type analyses with minimal familiarity with R.
The {ramnog} package is a collection of packages for setting up pipelines for AMNOG-style HTA analyses.
The aim of {ramnog} is to enable statisticians/programmers to set up an AMNOG-type analyses with minimal familiarity with `R`.

# Packages

Expand All @@ -38,14 +35,15 @@ dt |>

# Aim

The aim of the ramnog framework is that a programmer has to write minimal code, and no programming to in order to set-up a new AMNOG-type analyses. For each study, the programmer will need to make, adjust, or check the following four types of code:
The aim of {ramnog} is that a programmer has to write minimal code, and no programming to in order to set-up a new AMNOG-type analyses. For each study, the programmer will need to make, adjust, or check the following four types of code:

1. The definition of each endpoint (or group of endpoints).
2. A set of adam functions that makes any modifications to existing ADaM datasets (e.g., new age grouping in ADSL), or makes new ADaM datasets if none exist for the required output.
3. (If needed) Define a set of criteria for when an endpoint should be included in the results. A library of these criteria are stored in the companion package {chefCriteria}
4. A specification of the statistical functions used to summarize/analyze the data (usually found in the [chefStats](https://hta-pharma.github.io/chefStats/) package).
2. A set of ADaM functions that makes any modifications to existing ADaM datasets (e.g., new age grouping in ADSL), or makes new ADaM datasets if none exist for the required output.
3. (If needed) Define a set of criteria for when an endpoint should be included in the results. A library of these criteria are stored in the companion package {[chefCriteria](https://hta-pharma.github.io/chefCriteria/)}.
4. A specification of the statistical functions used to summarize/analyze the data. A library of these functions are provided in the {[chefStats](https://hta-pharma.github.io/chefStats/)} package.

A core principal of the frameworks design is __modularity__. The core functionality of the framework as specefied in the code in [chef](https://hta-pharma.github.io/chef/) should change slowly, while functionality that is subject to more frequent changes are sectioned off in other packages ([chefStats](https://hta-pharma.github.io/chefStats/) and [cheCriteria](https://hta-pharma.github.io/chefCriteria/))
A core principal of the frameworks design is __modularity__.
The core functionality of the framework resides in {[chef](https://hta-pharma.github.io/chef/)} and should change slowly, while functionality that is subject to more frequent changes are sectioned off in other packages ({[chefStats](https://hta-pharma.github.io/chefStats/)} and {[chefCriteria](https://hta-pharma.github.io/chefCriteria/)}).

# Contributing

Expand Down
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->
# ramnog <a href="https://hta-pharma.github.io/ramnog/"><img src="man/figures/logo.png" align="right" height="138" alt="ramnog website" /></a>

# R packages for AMNOG analyses

Ramnog is a collection of packages for setting up pipelines for
AMNOG-style HTA analyses

The aim of ramnog is that statistician/programmer can set up an
AMNOG-type analyses with minimal familiarity with R.
The {ramnog} package is a collection of packages for setting up
pipelines for AMNOG-style HTA analyses. The aim of {ramnog} is to enable
statisticians/programmers to set up an AMNOG-type analyses with minimal
familiarity with `R`.

# Packages

Expand Down Expand Up @@ -63,28 +60,31 @@ Wrapper package tying ecosystem together

# Aim

The aim of the ramnog framework is that a programmer has to write
minimal code, and no programming to in order to set-up a new AMNOG-type
analyses. For each study, the programmer will need to make, adjust, or
check the following four types of code:
The aim of {ramnog} is that a programmer has to write minimal code, and
no programming to in order to set-up a new AMNOG-type analyses. For each
study, the programmer will need to make, adjust, or check the following
four types of code:

1. The definition of each endpoint (or group of endpoints).
2. A set of adam functions that makes any modifications to existing
2. A set of ADaM functions that makes any modifications to existing
ADaM datasets (e.g., new age grouping in ADSL), or makes new ADaM
datasets if none exist for the required output.
3. (If needed) Define a set of criteria for when an endpoint should be
included in the results. A library of these criteria are stored in
the companion package {chefCriteria}
the companion package
{[chefCriteria](https://hta-pharma.github.io/chefCriteria/)}.
4. A specification of the statistical functions used to
summarize/analyze the data (usually found in the
[chefStats](https://hta-pharma.github.io/chefStats/) package).
summarize/analyze the data. A library of these functions are
provided in the
{[chefStats](https://hta-pharma.github.io/chefStats/)} package.

A core principal of the frameworks design is **modularity**. The core
functionality of the framework as specefied in the code in
[chef](https://hta-pharma.github.io/chef/) should change slowly, while
functionality that is subject to more frequent changes are sectioned off
in other packages ([chefStats](https://hta-pharma.github.io/chefStats/)
and [cheCriteria](https://hta-pharma.github.io/chefCriteria/))
functionality of the framework resides in
{[chef](https://hta-pharma.github.io/chef/)} and should change slowly,
while functionality that is subject to more frequent changes are
sectioned off in other packages
({[chefStats](https://hta-pharma.github.io/chefStats/)} and
{[chefCriteria](https://hta-pharma.github.io/chefCriteria/)}).

# Contributing

Expand Down
Binary file added man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 26 additions & 52 deletions tests/testthat/_snaps/mild_ae_by_sex.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,30 @@
ep_stat[, .(stat_filter, endpoint_group_filter, stat_result_label,
stat_result_description, stat_result_qualifiers, stat_result_value)]
Output
stat_filter
<char>
1: TOTAL_ == "total" & TRT01A == "Placebo"
2: TOTAL_ == "total" & TRT01A == "Placebo"
3: TOTAL_ == "total" & TRT01A == "Xanomeline High Dose"
4: TOTAL_ == "total" & TRT01A == "Xanomeline High Dose"
5: SEX == "F" & TRT01A == "Placebo"
---
4274:
4275:
4276:
4277:
4278:
endpoint_group_filter
<char>
1: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
2: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
3: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
4: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
5: AESOC == "GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS" & AESEV == "MILD"
---
4274: AESOC == "SOCIAL CIRCUMSTANCES" & AESEV == "SEVERE"
4275: AESOC == "EAR AND LABYRINTH DISORDERS" & AESEV == "SEVERE"
4276: AESOC == "EAR AND LABYRINTH DISORDERS" & AESEV == "SEVERE"
4277: AESOC == "NEOPLASMS BENIGN, MALIGNANT AND UNSPECIFIED (INCL CYSTS AND POLYPS)" & AESEV == "SEVERE"
4278: AESOC == "NEOPLASMS BENIGN, MALIGNANT AND UNSPECIFIED (INCL CYSTS AND POLYPS)" & AESEV == "SEVERE"
stat_result_label stat_result_description
<char> <char>
1: N Number of subjects
2: E Number of events
3: N Number of subjects
4: E Number of events
5: N Number of subjects
---
4274: <NA> P-value interaction not conducted
4275: <NA> P-value interaction not conducted
4276: <NA> P-value interaction not conducted
4277: <NA> P-value interaction not conducted
4278: <NA> P-value interaction not conducted
stat_result_qualifiers stat_result_value
<char> <num>
1: <NA> 86
2: <NA> 36
3: <NA> 72
4: <NA> 75
5: <NA> 53
---
4274: <NA> NA
4275: <NA> NA
4276: <NA> NA
4277: <NA> NA
4278: <NA> NA
stat_filter endpoint_group_filter stat_result_label
<char> <char> <char>
1: <NA> <NA> <NA>
2: <NA> <NA> <NA>
3: <NA> <NA> <NA>
4: <NA> <NA> <NA>
5: <NA> <NA> <NA>
---
29942: <NA> <NA> <NA>
29943: <NA> <NA> <NA>
29944: <NA> <NA> <NA>
29945: <NA> <NA> <NA>
29946: <NA> <NA> <NA>
stat_result_description stat_result_qualifiers stat_result_value
<char> <char> <num>
1: <NA> <NA> NA
2: <NA> <NA> NA
3: <NA> <NA> NA
4: <NA> <NA> NA
5: <NA> <NA> NA
---
29942: <NA> <NA> NA
29943: <NA> <NA> NA
29944: <NA> <NA> NA
29945: <NA> <NA> NA
29946: <NA> <NA> NA

10 changes: 9 additions & 1 deletion tests/testthat/test-mild_ae_by_sex.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,19 @@ test_that("Complex pipeline runs without errors",
# EXPECT ------------------------------------------------------------------
x <- targets::tar_meta() |> data.table::as.data.table()
targets::tar_load(ep_stat)
ep_stat <- ep_stat[order(c(endpoint_id,
strata_var,
fn_type,
fn_name,
stat_filter,
stat_result_label,
stat_result_description)), ]

expect_true(all(is.na(x$error)))
expect_snapshot(ep_stat[, .(stat_filter,
endpoint_group_filter,
stat_result_label,
stat_result_description,
stat_result_qualifiers,
stat_result_value)])
})
})
Loading

0 comments on commit 9d3d10f

Please sign in to comment.