Skip to content

Commit

Permalink
add prototypes_lup arg to renew
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewphamilton committed Jun 26, 2024
1 parent 9fcda0d commit a268299
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:

name: pkgdown

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
Expand Down
13 changes: 9 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Description: Modules from the readyforwhatsnext youth mental health
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]).
License: GPL-3 + file LICENSE
License: GPL-3
URL: https://ready4-dev.github.io/TTU/, https://github.com/ready4-dev/TTU,
https://ready4-dev.github.io/ready4/
Encoding: UTF-8
Expand All @@ -30,8 +30,10 @@ Suggests:
caret,
knitr,
knitrBootstrap,
pkgload,
rmarkdown,
testthat
testthat,
youthvars (>= 0.0.0.9125)
VignetteBuilder: knitr
Imports:
dplyr,
Expand All @@ -50,7 +52,8 @@ Imports:
utils
Depends:
R (>= 2.10),
specific
scorz (>= 0.0.0.9066),
specific (>= 0.0.0.9108)
LazyData: true
Collate:
'C4_TTUSynopsis.R'
Expand All @@ -75,4 +78,6 @@ Collate:
Remotes:
ready4-dev/ready4show,
ready4-dev/ready4use,
ready4-dev/specific
ready4-dev/specific,
ready4-dev/youthvars,
ready4-dev/scorz
2 changes: 1 addition & 1 deletion R/mthd_procure.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#'
#' Procure items from a dataset
#' Procure data from a model module
#' @name procure-TTUProject
#' @description procure method applied to TTUProject
#' @param x An object of class TTUProject
Expand Down
9 changes: 5 additions & 4 deletions R/mthd_renew.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#' @param depnt_var_min_val_1L_dbl Dependent variable minimum value (a double vector of length one), Default: numeric(0)
#' @param fl_nm_1L_chr File name (a character vector of length one), Default: character(0)
#' @param paths_chr Paths (a character vector), Default: character(0)
#' @param prototype_lup Prototype (a lookup table), Default: NULL
#' @param type_1L_chr Type (a character vector of length one), Default: 'default'
#' @param y_Ready4useRepos PARAM_DESCRIPTION, Default: ready4use::Ready4useRepos()
#' @param what_1L_chr What (a character vector of length one), Default: 'utility'
Expand All @@ -19,9 +20,9 @@
#' @importFrom ready4use Ready4useRepos
#' @importFrom ready4 renew
methods::setMethod("renew", "TTUProject", function (x, new_val_xx = NULL, consent_1L_chr = "", depnt_var_min_val_1L_dbl = numeric(0),
fl_nm_1L_chr = character(0), paths_chr = character(0), type_1L_chr = "default",
y_Ready4useRepos = ready4use::Ready4useRepos(), what_1L_chr = "utility",
...)
fl_nm_1L_chr = character(0), paths_chr = character(0), prototype_lup = NULL,
type_1L_chr = "default", y_Ready4useRepos = ready4use::Ready4useRepos(),
what_1L_chr = "utility", ...)
{
if (what_1L_chr == "parameters") {
if (type_1L_chr == "default") {
Expand Down Expand Up @@ -69,7 +70,7 @@ methods::setMethod("renew", "TTUProject", function (x, new_val_xx = NULL, consen
x <- renewSlot(x, "c_SpecificProject", SpecificModels(a_YouthvarsProfile = x@a_ScorzProfile@a_YouthvarsProfile,
b_SpecificParameters = x@b_SpecificParameters,
paths_chr = paths_chr))
x <- ratifySlot(x, "c_SpecificProject")
x <- ratifySlot(x, "c_SpecificProject", prototype_lup = prototype_lup)
x <- renewSlot(x, "c_SpecificProject", authorSlot(x,
"c_SpecificProject", consent_1L_chr = consent_1L_chr,
what_1L_chr = "workspace"))
Expand Down
3 changes: 2 additions & 1 deletion data-raw/s4_fns/renew.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ renew_TTUProject <- function(x,
depnt_var_min_val_1L_dbl = numeric(0),
fl_nm_1L_chr = character(0),
paths_chr = character(0),
prototype_lup = NULL,
type_1L_chr = "default",
y_Ready4useRepos = ready4use::Ready4useRepos(),
what_1L_chr = "utility",
Expand Down Expand Up @@ -44,7 +45,7 @@ renew_TTUProject <- function(x,
if(type_1L_chr == "default"){
x <- renewSlot(x, "c_SpecificProject", SpecificModels(a_YouthvarsProfile = x@a_ScorzProfile@a_YouthvarsProfile,
b_SpecificParameters = x@b_SpecificParameters, paths_chr = paths_chr))
x <- ratifySlot(x, "c_SpecificProject")
x <- ratifySlot(x, "c_SpecificProject", prototype_lup = prototype_lup)
x <- renewSlot(x, "c_SpecificProject", authorSlot(x, "c_SpecificProject", consent_1L_chr = consent_1L_chr, what_1L_chr = "workspace"))
}
if(type_1L_chr == "dummys"){
Expand Down
Binary file modified data/mdl_types_lup.rda
Binary file not shown.
Binary file modified data/plt_types_lup.rda
Binary file not shown.
Binary file modified data/rprt_lup.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/procure-methods.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/renew-methods.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a268299

Please sign in to comment.