Skip to content

Commit

Permalink
modified vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewphamilton committed Feb 8, 2024
1 parent 6140d4b commit 1644318
Show file tree
Hide file tree
Showing 48 changed files with 528 additions and 104 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-tinytex@v2

- uses: r-lib/actions/setup-tinytex@v2

Expand All @@ -32,6 +34,14 @@ jobs:
with:
use-public-rspm: true

# Addresses issue with incompatibility between libcurl4-gnutls-dev and libcurl4-openssl-dev
# Below fix is a customisation of approach outlined in https://github.com/r-hub/sysreqsdb/issues/77#issuecomment-620025428
- name: Install libraptor on Linux
if: runner.os == 'Linux'
run: |
sudo add-apt-repository ppa:cran/librdf
sudo apt update
# Addresses issue with incompatibility between libcurl4-gnutls-dev and libcurl4-openssl-dev
# Below fix is a customisation of approach outlined in https://github.com/r-hub/sysreqsdb/issues/77#issuecomment-620025428
- name: Install libraptor on Linux
Expand All @@ -49,9 +59,9 @@ jobs:
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
- name: Deploy to GitHub pages <U+0001F680>
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RoxygenNote: 7.2.3
Suggests:
knitr,
rmarkdown,
scorz,
scorz (>= 0.0.0.9062),
testthat
VignetteBuilder: knitr
Imports:
Expand Down Expand Up @@ -56,8 +56,9 @@ Imports:
Depends:
R (>= 2.10)
LazyData: true
Remotes:
Remotes:
ready4-dev/ready4,
ready4-dev/ready4use,
ready4-dev/specific,
ready4-dev/youthvars
ready4-dev/youthvars,
ready4-dev/scorz
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
youthu - Transform Youth Outcomes to Health Utility Predictions
Copyright (C) 2023 Orygen
Copyright (C) 2024 Orygen

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
16 changes: 8 additions & 8 deletions R/fn_add.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' Add change in dataset variable
#' @description add_change_in_ds_var() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add change in dataset variable. Function argument ds_tb specifies the object to be updated. The function returns Updated dataset (a tibble).
#' @description add_change_in_ds_var() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add change in dataset variable. The function returns Updated dataset (a tibble).
#' @param ds_tb Dataset (a tibble)
#' @param id_var_nm_1L_chr Identity variable name (a character vector of length one), Default: 'fkClientID'
#' @param round_var_nm_1L_chr Round variable name (a character vector of length one), Default: 'round'
Expand Down Expand Up @@ -28,7 +28,7 @@ add_change_in_ds_var <- function (ds_tb, id_var_nm_1L_chr = "fkClientID", round_
return(updated_ds_tb)
}
#' Add costs by time point
#' @description add_costs_by_tmpt() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add costs by time point. Function argument ds_tb specifies the object to be updated. The function returns Updated dataset (a tibble).
#' @description add_costs_by_tmpt() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add costs by time point. The function returns Updated dataset (a tibble).
#' @param ds_tb Dataset (a tibble)
#' @param round_var_nm_1L_chr Round variable name (a character vector of length one)
#' @param round_lvls_chr Round levels (a character vector), Default: c("Baseline", "Follow-up")
Expand Down Expand Up @@ -58,7 +58,7 @@ add_costs_by_tmpt <- function (ds_tb, round_var_nm_1L_chr, round_lvls_chr = c("B
return(updated_ds_tb)
}
#' Add costs from gamma distribution
#' @description add_costs_from_gamma_dstr() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add costs from gamma distribution. Function argument ds_tb specifies the object to be updated. The function returns Updated dataset (a tibble).
#' @description add_costs_from_gamma_dstr() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add costs from gamma distribution. The function returns Updated dataset (a tibble).
#' @param ds_tb Dataset (a tibble)
#' @param costs_mean_dbl Costs mean (a double vector)
#' @param costs_sd_dbl Costs standard deviation (a double vector)
Expand All @@ -77,7 +77,7 @@ add_costs_from_gamma_dstr <- function (ds_tb, costs_mean_dbl, costs_sd_dbl, cost
return(updated_ds_tb)
}
#' Add dates from distribution
#' @description add_dates_from_dstr() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add dates from distribution. Function argument ds_tb specifies the object to be updated. The function returns Updated dataset (a tibble).
#' @description add_dates_from_dstr() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add dates from distribution. The function returns Updated dataset (a tibble).
#' @param ds_tb Dataset (a tibble)
#' @param bl_start_date_dtm Baseline start date (a date vector)
#' @param bl_end_date_dtm Baseline end date (a date vector)
Expand Down Expand Up @@ -120,7 +120,7 @@ add_dates_from_dstr <- function (ds_tb, bl_start_date_dtm, bl_end_date_dtm, dura
return(updated_ds_tb)
}
#' Add differences by group and time point
#' @description add_diffs_by_group_and_tmpt() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add differences by group and time point. Function argument ds_tb specifies the object to be updated. The function returns Updated dataset (a tibble).
#' @description add_diffs_by_group_and_tmpt() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add differences by group and time point. The function returns Updated dataset (a tibble).
#' @param ds_tb Dataset (a tibble), Default: trial_ds_tb
#' @param cmprsn_var_nm_1L_chr Comparison variable name (a character vector of length one), Default: 'study_arm_chr'
#' @param cmprsn_group_match_val_chr Comparison group match value (a character vector), Default: c("Intervention")
Expand Down Expand Up @@ -161,7 +161,7 @@ add_diffs_by_group_and_tmpt <- function (ds_tb = trial_ds_tb, cmprsn_var_nm_1L_c
return(updated_ds_tb)
}
#' Add Quality Adjusted Life Years
#' @description add_qalys() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add quality adjusted life years. Function argument ds_tb specifies the object to be updated. The function returns Updated dataset (a tibble).
#' @description add_qalys() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add quality adjusted life years. The function returns Updated dataset (a tibble).
#' @param ds_tb Dataset (a tibble)
#' @param cmprsn_var_nm_1L_chr Comparison variable name (a character vector of length one), Default: 'study_arm_chr'
#' @param duration_var_nm_1L_chr Duration variable name (a character vector of length one), Default: 'duration_prd'
Expand Down Expand Up @@ -211,7 +211,7 @@ add_qalys <- function (ds_tb, cmprsn_var_nm_1L_chr = "study_arm_chr", duration_v
return(updated_ds_tb)
}
#' Add Quality Adjusted Life Years to dataset
#' @description add_qalys_to_ds() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add quality adjusted life years to dataset. Function argument ds_tb specifies the object to be updated. The function returns Dataset (a tibble).
#' @description add_qalys_to_ds() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add quality adjusted life years to dataset. The function returns Dataset (a tibble).
#' @param ds_tb Dataset (a tibble)
#' @param predn_ds_ls Prediction dataset (a list)
#' @param include_predrs_1L_lgl Include predictors (a logical vector of length one), Default: T
Expand Down Expand Up @@ -250,7 +250,7 @@ add_qalys_to_ds <- function (ds_tb, predn_ds_ls, include_predrs_1L_lgl = T, resh
return(ds_tb)
}
#' Add utility prediction
#' @description add_utl_predn() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add utility prediction. Function argument data_tb specifies the object to be updated. The function returns Updated (a tibble).
#' @description add_utl_predn() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add utility prediction. The function returns Updated (a tibble).
#' @param data_tb Data (a tibble)
#' @param predn_ds_ls Prediction dataset (a list)
#' @param deterministic_1L_lgl Deterministic (a logical vector of length one), Default: T
Expand Down
Loading

0 comments on commit 1644318

Please sign in to comment.