Skip to content

Commit 9dafd8f

Browse files
updated dpcys
1 parent 7f54380 commit 9dafd8f

16 files changed

+106
-51
lines changed

DESCRIPTION

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ Description: Tools for mapping measures routinely collected in youth
1717
youthu package has been made available as part of the process of
1818
testing and documenting the package. If you have any questions, please
1919
contact the authors ([email protected]).
20-
License: GPL-3 + file LICENSE
20+
License: GPL-3
2121
URL: https://ready4-dev.github.io/youthu/,
2222
https://github.com/ready4-dev/youthu, https://www.ready4-dev.com/
2323
Encoding: UTF-8
2424
Roxygen: list(markdown = TRUE)
2525
RoxygenNote: 7.3.1
2626
Suggests:
2727
knitr,
28+
pkgload,
2829
rmarkdown,
29-
scorz,
30+
scorz (>= 0.0.0.9065),
3031
testthat
3132
VignetteBuilder: knitr
3233
Imports:
@@ -57,7 +58,8 @@ Imports:
5758
Depends:
5859
R (>= 2.10)
5960
LazyData: true
60-
Remotes:
61+
Remotes:
6162
ready4-dev/ready4use,
6263
ready4-dev/specific,
63-
ready4-dev/youthvars
64+
ready4-dev/youthvars,
65+
ready4-dev/scorz

LICENSE

-15
This file was deleted.

NAMESPACE

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Generated by roxygen2: do not edit by hand
22

33
export("%>%")
4+
export(":=")
5+
export(.data)
46
export(add_change_in_ds_var)
57
export(add_costs_by_tmpt)
68
export(add_costs_from_gamma_dstr)
@@ -97,6 +99,8 @@ importFrom(ready4,get_from_lup_obj)
9799
importFrom(ready4,ingest)
98100
importFrom(ready4use,Ready4useRepos)
99101
importFrom(ready4use,add_labels_from_dictionary)
102+
importFrom(rlang,":=")
103+
importFrom(rlang,.data)
100104
importFrom(rlang,exec)
101105
importFrom(rlang,sym)
102106
importFrom(specific,add_utl_predn_to_new_ds)

R/imp_fns.R

+32-4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,51 @@
11
#' Pipe operator
22
#'
3-
#' Implements: https://github.com/sckott/analogsea/issues/32
4-
#' and https://github.com/rstudio/ggvis/blob/master/R/pipe.R.
3+
#' Import of [magrittr::%>%()]. See magrittr package documentation for detailed description.
54
#'
65
#' @importFrom magrittr %>%
76
#' @name %>%
87
#' @rdname pipe
98
#' @export
10-
#' @param lhs,rhs An object and a function to apply to it
119
#' @keywords internal
10+
#' @returns The type of return from this function depends on the left hand side and right hand side arguments supplied to it. In principle, any type of returned object is feasible.
11+
#' @seealso [magrittr::%>%()]
1212
NULL
1313

1414
#' Deprecated function
1515
#'
16-
#' Import of deprecated function as recommended in lifecycle package documentation.
16+
#' Import of [lifecycle::deprecated()]. See lifecycle package documentation for detailed description.
1717
#'
1818
#' @importFrom lifecycle deprecated
1919
#' @name deprecated
2020
#' @rdname deprecated
2121
#' @export
2222
#' @keywords internal
23+
#' @returns Does not return a value as the function is used to signal that a function argument has been deprecated.
24+
#' @seealso [lifecycle::deprecated()]
25+
NULL
26+
27+
#' Non standard evaluation assignment function
28+
#'
29+
#' Import of := function, implementing [rlang::dyn-dots()]. See rlang package documentation for detailed description.
30+
#'
31+
#' @importFrom rlang :=
32+
#' @name :=
33+
#' @rdname nseequals
34+
#' @export
35+
#' @keywords internal
36+
#' @returns Does not return a value. Used to implement non standard evaluation within a dynamic dots context.
37+
#' @seealso [rlang::dyn-dots()]
38+
NULL
39+
40+
#' Dot Data function
41+
#'
42+
#' Import of [rlang::.data()]. See rlang package documentation for detailed description.
43+
#'
44+
#' @importFrom rlang .data
45+
#' @name .data
46+
#' @rdname dotdata
47+
#' @export
48+
#' @keywords internal
49+
#' @returns Does not return a value. A pronoun for use in data-masked functions.
50+
#' @seealso [rlang::.data()]
2351
NULL

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
Tools for mapping measures routinely collected in youth
1414
mental health services to Quality Adjusted Life Years (QALYs). Part of
15-
the ready4 youth mental health systems model
16-
(https://www.ready4-dev.com/docs/model/). This development version of
17-
the youthu package has been made available as part of the process of
15+
the ready4forwhatsnext youth mental health systems model
16+
(https://readyforwhatsnext.org/). This development version of the
17+
youthu package has been made available as part of the process of
1818
testing and documenting the package. If you have any questions, please
1919
contact the authors ([email protected]).
2020

_pkgdown.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ home:
1010
href: https://github.com/ready4-dev/youthu/releases/download/Documentation_0.0/youthu_User.pdf
1111
- text: Manual - Developer (PDF)
1212
href: https://github.com/ready4-dev/youthu/releases/download/Documentation_0.0/youthu_Developer.pdf
13-
- text: Framework and Model
13+
- text: Model
1414
href: https://www.ready4-dev.com/
1515
development:
1616
mode: auto

data-raw/DATASET.R

+9-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
library(ready4)
33
library(ready4show)
44
library(ready4use)
5+
library(ready4fun)
56
library(youthvars)
67
library(scorz)
78
library(specific)
@@ -10,9 +11,9 @@ ready4fun::write_fn_type_dirs()
1011
fns_env_ls <- ready4fun::read_fns(c("data-raw/fns/","data-raw/mthds/"),
1112
fns_env = new.env(parent = globalenv()))
1213
x <- ready4fun::make_pkg_desc_ls(pkg_title_1L_chr = "Transform Youth Outcomes to Health Utility Predictions" %>% tools::toTitleCase(),
13-
pkg_desc_1L_chr = "Tools for mapping measures routinely collected in youth mental health services to Quality Adjusted Life Years (QALYs). Part of the ready4 youth mental health systems model (https://www.ready4-dev.com/docs/model/).
14+
pkg_desc_1L_chr = "Tools for mapping measures routinely collected in youth mental health services to Quality Adjusted Life Years (QALYs). Part of the ready4forwhatsnext youth mental health systems model (https://readyforwhatsnext.org/).
1415
This development version of the youthu package has been made available as part of the process of testing and documenting the package. If you have any questions, please contact the authors ([email protected]).",
15-
authors_prsn = c(utils::person(given = "Matthew",family = "Hamilton",email = "[email protected]", role = c("aut", "cre"),comment = c(ORCID = "0000-0001-7407-9194")),
16+
authors_prsn = c(utils::person(given = "Matthew",family = "Hamilton",email = "[email protected]", role = c("aut", "cre", "cph"),comment = c(ORCID = "0000-0001-7407-9194")),
1617
utils::person(given = "Caroline",family = "Gao",email = "[email protected]", role = c("aut"),comment = c(ORCID = "0000-0002-0987-2759")),
1718
utils::person("Orygen", role = c("cph", "fnd")),
1819
utils::person("Headspace", role = c( "fnd")),
@@ -24,7 +25,7 @@ x <- ready4fun::make_pkg_desc_ls(pkg_title_1L_chr = "Transform Youth Outcomes to
2425
suggests_chr = c("knitr","rmarkdown", "scorz")),
2526
build_ignore_ls = ready4fun::make_build_ignore_ls(file_nms_chr = c("initial_setup.R")),
2627
check_type_1L_chr = "ready4",
27-
copyright_holders_chr = "Orygen",
28+
copyright_holders_chr = "Matthew Hamilton and Orygen",
2829
custom_dmt_ls = ready4fun::make_custom_dmt_ls(user_manual_fns_chr = c("add_utl_predn",
2930
"add_qalys_to_ds",
3031
"get_mdl_from_dv",
@@ -34,7 +35,7 @@ x <- ready4fun::make_pkg_desc_ls(pkg_title_1L_chr = "Transform Youth Outcomes to
3435
"make_sngl_grp_ds",
3536
"make_matched_ds",
3637
"rename_from_nmd_vec")),##
37-
dev_pkgs_chr = c("ready4",
38+
dev_pkgs_chr = c(#"ready4",
3839
"ready4use","ready4show",
3940
"scorz", "specific",
4041
"youthvars"),
@@ -58,12 +59,10 @@ z <- ready4::author(z)
5859
usethis::use_dev_package("scorz", type = "Suggests", remote = "ready4-dev/scorz")
5960
ready4::write_extra_pkgs_to_actions(path_to_dir_1L_chr = ".github/workflows", consent_1L_chr = "Y")
6061
write_to_edit_workflow("pkgdown.yaml", consent_1L_chr = "Y") # In other packages, run for "test-coverage.yaml" as well.
61-
readLines("_pkgdown.yml") %>%
62-
stringr::str_replace_all(" - text: Model", " - text: Framework & Model") %>%
63-
writeLines(con = "_pkgdown.yml")
64-
devtools::build_vignettes()
65-
# ready4::write_citation_cff(packageDescription("youthu"),
66-
# citation_chr = readLines("inst/CITATION"))
62+
write_to_tidy_pkg(z$x_ready4fun_manifest, build_vignettes_1L_lgl = TRUE,
63+
clean_license_1L_lgl = TRUE, consent_1L_chr = "Y",
64+
examples_chr = character(0),
65+
suggest_chr = "pkgload")
6766
# usethis::use_dev_package("TTU",
6867
# type = "Depends",
6968
# remote = "ready4-dev/TTU")

inst/CITATION

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ bibentry(
44
bibtype = "Manual",
55
doi = "10.5281/zenodo.5646668",
66
title = paste0(meta$Package,": ",meta$Title),
7-
author = c(person("Matthew Hamilton <[email protected]> [aut, cre]", "(<https://orcid.org/0000-0001-7407-9194>)"), person("Caroline Gao <[email protected]> [aut]", "(<https://orcid.org/0000-0002-0987-2759>)")),
7+
author = c(person("Matthew Hamilton <[email protected]> [aut, cre, cph]", "(<https://orcid.org/0000-0001-7407-9194>)"), person("Caroline Gao <[email protected]> [aut]", "(<https://orcid.org/0000-0002-0987-2759>)")),
88
year = "2024",
99
note = sprintf("R package version %s", meta$Version),
1010
url = "https://ready4-dev.github.io/youthu/",
11-
textVersion = paste("Matthew Hamilton <[email protected]> [aut, cre] (<https://orcid.org/0000-0001-7407-9194>) and Caroline Gao <[email protected]> [aut] (<https://orcid.org/0000-0002-0987-2759>) ",
11+
textVersion = paste("Matthew Hamilton <[email protected]> [aut, cre, cph] (<https://orcid.org/0000-0001-7407-9194>) and Caroline Gao <[email protected]> [aut] (<https://orcid.org/0000-0002-0987-2759>) ",
1212
"(2024).",
1313
paste0(meta$Package,": ",meta$Title,
1414
"."),

man/deprecated.Rd

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dotdata.Rd

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/nseequals.Rd

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/pipe.Rd

+6-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/youthu-package.Rd

+3-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/Prediction_With_Mdls.Rmd

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ This vignette outlines a workflow for:
2121
- Preparing a prediction dataset for use with a selected transfer to utility model; and
2222
- Applying the selected transfer to utility model to a prediction dataset to predict Quality Adjusted Life Years (QALYs).
2323

24-
The practical value of implementing such a workflow is discussed in the [economic analysis vignette](https://ready4-dev.github.io/youthu/articles/Economic_Analysis.html) and [a scientific manuscript](https://www.medrxiv.org/content/10.1101/2021.07.07.21260129v2.full). Note, this example uses fake data - it should should not be used to inform decision making.
24+
The practical value of implementing such a workflow is discussed in the [economic analysis vignette](https://ready4-dev.github.io/youthu/articles/Economic_Analysis.html) and [a scientific manuscript](
25+
https://www.medrxiv.org/content/10.1101/2021.07.07.21260129v4). Note, this example uses fake data - it should should not be used to inform decision making.
2526

2627
## Search, select and retrieve transfer to utility models
2728
To identify datasets that contain transfer to utility models compatible with youthu (ie those developped with the [TTU package](https://ready4-dev.github.io/TTU/index.html)), you can use the `get_ttu_dv_dss` function. The function searches specified dataverses (in the below example, the [TTU dataverse](https://dataverse.harvard.edu/dataverse/TTU)) for datasets containing output from the TTU package.

vignettes/V_01.Rmd

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ data_tb <- transform_ds_to_drop_msng(data_tb, predictors_chr = c("gad7", "phq9")
110110
uid_var_nm_1L_chr = "fkClientID")
111111
```
112112

113-
114113
We now predict AQoL-6D health utility for each case with complete data.
115114

116115
```{r}

vignettes/youthu.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ knitr::opts_chunk$set(
1717
```{r setup}
1818
library(youthu)
1919
```
20-
The tools in youthu are designed to make it easier to predict health utility with the [ready4 health economic model](https://www.ready4-dev.com/docs/model/).
20+
The tools in youthu are designed to make it easier to predict health utility with the [readyforwhatsnext health economic model](https://readyforwhatsnext.org/).
2121

2222
This development version of the youthu package has been made available as part of the process of testing and documenting the package.
2323

0 commit comments

Comments
 (0)