Skip to content

Commit 3e0bcc4

Browse files
minor fixes
1 parent 6e5bee6 commit 3e0bcc4

8 files changed

Lines changed: 28 additions & 20 deletions

File tree

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
cff-version: 1.2.0
2-
message: "Matthew Hamilton and Caroline Gao (2022). specific: Specify Candidate Models for Representing Mental Health Systems. Version 0.0.0.9073. Zenodo. https://doi.org/10.5281/zenodo.5768689"
2+
message: "Matthew Hamilton and Caroline Gao (2022). specific: Specify Candidate Models for Representing Mental Health Systems. Version 0.0.0.9074. Zenodo. https://doi.org/10.5281/zenodo.5768689"
33
authors:
44
- family-names: "Hamilton"
55
given-names: "Matthew"
66
- family-names: "Gao"
77
given-names: "Caroline"
88
title: "specific: Specify Candidate Models for Representing Mental Health Systems"
9-
version: 0.0.0.9073
9+
version: 0.0.0.9074
1010
doi: 10.5281/zenodo.5768689
1111
date-released: 2022-02-15
1212
url: "https://ready4-dev.github.io/specific/"

DESCRIPTION

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,15 @@ Collate:
119119
'pkg_specific.R'
120120
'specific-package.R'
121121
Suggests:
122-
scorz,
123-
rmarkdown
124-
Remotes:
122+
scorz (>= 0.0.0.9048),
123+
rmarkdown,
124+
betareg,
125+
cmdstanr (>= 0.4.0.9000),
126+
rstan
127+
Remotes:
125128
ready4-dev/ready4,
126129
ready4-dev/ready4show,
127130
ready4-dev/ready4use,
128-
ready4-dev/youthvars
131+
ready4-dev/youthvars,
132+
stan-dev/cmdstanr,
133+
ready4-dev/scorz

R/mthd_author.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,12 @@ methods::setMethod("author", "SpecificSynopsis", function (x, reference_1L_int =
9292
{
9393
if (what_1L_chr == "Catalogue") {
9494
outp_smry_ls_ls <- manufacture(x@b_SpecificResults, what_1L_chr = "indexed_shareable")
95-
if (is.na(reference_1L_int)) {
95+
refs_int <- 1:length(outp_smry_ls_ls)
96+
if (!is.na(reference_1L_int)) {
9697
outp_smry_ls_ls <- outp_smry_ls_ls[reference_1L_int]
98+
refs_int <- reference_1L_int
9799
}
98-
ctlg_nms_chr <- purrr::map2_chr(outp_smry_ls_ls, 1:length(outp_smry_ls_ls),
100+
ctlg_nms_chr <- purrr::map2_chr(outp_smry_ls_ls, refs_int,
99101
~{
100102
fl_nm_1L_chr <- paste0("AAA_TTU_MDL_CTG", ifelse(.y ==
101103
1, "", paste0("-", (.y - 1))))

R/mthd_depict.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ methods::setMethod("depict", "SpecificSynopsis", function (x, axis_text_sclg_1L_
5757
renew(old_nms_chr = timepoint_old_nms_chr, new_nms_chr = timepoint_new_nms_chr)
5858
}
5959
else {
60-
correspondences_lup
60+
correspondences_lup <- NULL
6161
}
6262
if (what_1L_chr == "composite_mdl") {
6363
plt <- make_cmpst_sctr_and_dnst_plt(outp_smry_ls, base_size_1L_dbl = base_size_1L_dbl,

R/mthd_manufacture.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ methods::setMethod("manufacture", "SpecificResults", function (x, what_1L_chr =
1818
secondary_chr <- names(shareable_outp_ls)[startsWith(names(shareable_outp_ls),
1919
"secondary_")]
2020
if (!identical(secondary_chr, character(0))) {
21-
primary_ls <- shareable_outp_ls[names(shareable_outp_ls) !=
22-
secondary_chr]
23-
secondary_ls <- shareable_outp_ls[names(shareable_outp_ls) ==
24-
secondary_chr]
21+
primary_ls <- shareable_outp_ls[setdiff(names(shareable_outp_ls),
22+
secondary_chr)]
23+
secondary_ls <- shareable_outp_ls[secondary_chr]
2524
object_xx <- append(list(primary_ls = primary_ls[(names(primary_ls))[!names(primary_ls) %>%
2625
duplicated()]]), secondary_ls %>% purrr::map(~.x[(.x %>%
2726
names())[!.x %>% names() %>% duplicated()]]))
@@ -187,7 +186,7 @@ methods::setMethod("manufacture", "SpecificSynopsis", function (x, depnt_var_nms
187186
conclusion_1L_chr = x@conclusion_1L_chr, ethics_1L_chr = x@ethics_1L_chr,
188187
funding_1L_chr = x@funding_1L_chr, sample_desc_1L_chr = x@sample_desc_1L_chr,
189188
var_nm_change_lup = x@correspondences_r3)
190-
if (what_1L_chr == "results_ls") {
189+
if (what_1L_chr %in% c("abstract_args_ls", "results_ls")) {
191190
object_xx <- make_results_ls(dv_ds_nm_and_url_chr = object_xx$path_params_ls$dv_ds_nm_and_url_chr,
192191
make_cmpst_plt_1L_lgl = make_cmpst_plt_1L_lgl,
193192
outp_smry_ls = x@b_SpecificResults@a_SpecificShareable@shareable_outp_ls,

data-raw/s4_fns/author.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,13 @@ author_SpecificSynopsis <- function(x,
112112
if(what_1L_chr == "Catalogue"){
113113
outp_smry_ls_ls <- manufacture(x@b_SpecificResults,
114114
what_1L_chr = "indexed_shareable")
115-
if(is.na(reference_1L_int)){
115+
refs_int <- 1:length(outp_smry_ls_ls)
116+
if(!is.na(reference_1L_int)){
116117
outp_smry_ls_ls <- outp_smry_ls_ls[reference_1L_int]
118+
refs_int <- reference_1L_int
117119
}
118120
ctlg_nms_chr <- purrr::map2_chr(outp_smry_ls_ls,
119-
1:length(outp_smry_ls_ls),
121+
refs_int,
120122
~ {
121123
fl_nm_1L_chr <- paste0("AAA_TTU_MDL_CTG",
122124
ifelse(.y==1,

data-raw/s4_fns/depict.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ depict_SpecificSynopsis <- function(x,
7272
renew(old_nms_chr = timepoint_old_nms_chr,
7373
new_nms_chr = timepoint_new_nms_chr)
7474
}else{
75-
correspondences_lup
75+
correspondences_lup <- NULL
7676
}
7777
if(what_1L_chr == "composite_mdl"){
7878
plt <- make_cmpst_sctr_and_dnst_plt(outp_smry_ls,

data-raw/s4_fns/manufacture.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ manufacture_SpecificSynopsis <- function(x,
6565
#predr_ctgs_ls = NULL,
6666
sample_desc_1L_chr = x@sample_desc_1L_chr,
6767
var_nm_change_lup = x@correspondences_r3)
68-
if(what_1L_chr == "results_ls"){
68+
if(what_1L_chr %in% c("abstract_args_ls","results_ls")){
6969
object_xx <- make_results_ls(dv_ds_nm_and_url_chr = object_xx$path_params_ls$dv_ds_nm_and_url_chr,
7070
make_cmpst_plt_1L_lgl = make_cmpst_plt_1L_lgl,
7171
outp_smry_ls = x@b_SpecificResults@a_SpecificShareable@shareable_outp_ls,
@@ -182,8 +182,8 @@ manufacture_SpecificResults<- function(x,
182182
"a_SpecificShareable@shareable_outp_ls")
183183
secondary_chr <- names(shareable_outp_ls)[startsWith(names(shareable_outp_ls),"secondary_")]
184184
if(!identical(secondary_chr,character(0))){
185-
primary_ls <- shareable_outp_ls[names(shareable_outp_ls)!=secondary_chr]
186-
secondary_ls <- shareable_outp_ls[names(shareable_outp_ls)==secondary_chr]
185+
primary_ls <- shareable_outp_ls[setdiff(names(shareable_outp_ls),secondary_chr)]
186+
secondary_ls <- shareable_outp_ls[secondary_chr]
187187
object_xx <- append(list(primary_ls = primary_ls[(names(primary_ls))[!names(primary_ls) %>% duplicated()]]),
188188
secondary_ls %>%
189189
purrr::map(~.x[(.x %>% names())[!.x %>% names() %>% duplicated()]]))

0 commit comments

Comments
 (0)