Skip to content

Commit 1d7a409

Browse files
fix of youthvars fn ref and addition of documented fns@
1 parent 2a89715 commit 1d7a409

113 files changed

Lines changed: 343 additions & 221 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NAMESPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export(transform_uid_var)
171171
export(validate_TTU_predictors_lup)
172172
export(write_analyses)
173173
export(write_box_cox_tfmn)
174+
export(write_csp_output)
174175
export(write_main_oupt_dir)
175176
export(write_manuscript)
176177
export(write_mdl_cmprsn)
@@ -185,6 +186,7 @@ export(write_predr_and_covars_cmprsn)
185186
export(write_predr_and_mdl_tstng_results)
186187
export(write_predr_cmprsn_outps)
187188
export(write_report)
189+
export(write_reporting_dir)
188190
export(write_rprt_with_rcrd)
189191
export(write_scndry_analysis)
190192
export(write_scndry_analysis_dir)
@@ -277,6 +279,7 @@ importFrom(kableExtra,kbl)
277279
importFrom(knitr,knit_child)
278280
importFrom(knitr,knit_expand)
279281
importFrom(knitr,opts_current)
282+
importFrom(knitr,purl)
280283
importFrom(lubridate,days)
281284
importFrom(magrittr,"%>%")
282285
importFrom(pacman,p_load)

R/fn_get.R

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#' @rdname get_background_text
66
#' @export
77

8-
#' @keywords internal
98
get_background_text <- function (results_ls)
109
{
1110
text_1L_chr <- results_ls$study_descs_ls$background_1L_chr
@@ -34,7 +33,6 @@ get_cndts_for_mxd_mdls <- function (mdl_types_lup = NULL)
3433
#' @rdname get_conclusion_text
3534
#' @export
3635

37-
#' @keywords internal
3836
get_conclusion_text <- function (results_ls)
3937
{
4038
text_1L_chr <- results_ls$study_descs_ls$conclusion_1L_chr
@@ -48,7 +46,6 @@ get_conclusion_text <- function (results_ls)
4846
#' @rdname get_covar_ctgs
4947
#' @export
5048
#' @importFrom stringi stri_replace_last_fixed
51-
#' @keywords internal
5249
get_covar_ctgs <- function (results_ls, collapse_1L_lgl = T)
5350
{
5451
covar_ctgs_chr <- names(results_ls$candidate_covars_ls) %>%
@@ -70,7 +67,6 @@ get_covar_ctgs <- function (results_ls, collapse_1L_lgl = T)
7067
#' @importFrom stats setNames
7168
#' @importFrom stringi stri_replace_last_fixed
7269
#' @importFrom Hmisc capitalize
73-
#' @keywords internal
7470
get_covars_by_ctg <- function (results_ls, collapse_1L_lgl = F)
7571
{
7672
covars_by_ctg_ls <- results_ls$candidate_covars_ls %>% purrr::map(~.x %>%
@@ -96,7 +92,6 @@ get_covars_by_ctg <- function (results_ls, collapse_1L_lgl = F)
9692
#' @rdname get_hlth_utl_nm
9793
#' @export
9894

99-
#' @keywords internal
10095
get_hlth_utl_nm <- function (results_ls, short_nm_1L_lgl = T)
10196
{
10297
health_utl_nm_1L_chr <- ifelse(short_nm_1L_lgl, results_ls$study_descs_ls$health_utl_nm_1L_chr,
@@ -111,7 +106,6 @@ get_hlth_utl_nm <- function (results_ls, short_nm_1L_lgl = T)
111106
#' @rdname get_hlth_utl_stat
112107
#' @export
113108

114-
#' @keywords internal
115109
get_hlth_utl_stat <- function (results_ls, stat_1L_chr = "bl_mean")
116110
{
117111
hlth_utl_stat_1L_chr <- switch(stat_1L_chr, bl_mean = results_ls$hlth_utl_and_predrs_ls$bl_hu_mean_1L_dbl,
@@ -128,7 +122,6 @@ get_hlth_utl_stat <- function (results_ls, stat_1L_chr = "bl_mean")
128122
#' @rdname get_link_from_tfmn
129123
#' @export
130124

131-
#' @keywords internal
132125
get_link_from_tfmn <- function (tfmn_1L_chr, is_OLS_1L_lgl = F)
133126
{
134127
link_1L_chr <- ifelse(is_OLS_1L_lgl, "identity", ifelse(tfmn_1L_chr ==
@@ -147,7 +140,6 @@ get_link_from_tfmn <- function (tfmn_1L_chr, is_OLS_1L_lgl = F)
147140
#' @rdname get_lngl_ttu_types
148141
#' @export
149142
#' @importFrom stringi stri_replace_last
150-
#' @keywords internal
151143
get_lngl_ttu_types <- function (results_ls, collapse_1L_lgl = T)
152144
{
153145
mdl_types_chr <- results_ls$ttu_lngl_ls$best_mdls_tb$model_type
@@ -169,7 +161,6 @@ get_lngl_ttu_types <- function (results_ls, collapse_1L_lgl = T)
169161
#' @importFrom purrr map map_chr
170162
#' @importFrom stats setNames
171163
#' @importFrom stringi stri_replace_last_fixed
172-
#' @keywords internal
173164
get_mdl_cmprsns <- function (results_ls, describe_1L_lgl = T, mixed_1L_lgl = F,
174165
as_list_1L_lgl = F)
175166
{
@@ -227,7 +218,6 @@ get_mdl_cmprsns <- function (results_ls, describe_1L_lgl = T, mixed_1L_lgl = F,
227218
#' @importFrom utils data
228219
#' @importFrom dplyr pull
229220
#' @importFrom purrr map_lgl
230-
#' @keywords internal
231221
get_mdl_type_from_nm <- function (mdl_nm_1L_chr, mdl_types_lup = NULL)
232222
{
233223
if (is.null(mdl_types_lup))
@@ -247,7 +237,6 @@ get_mdl_type_from_nm <- function (mdl_nm_1L_chr, mdl_types_lup = NULL)
247237
#' @importFrom purrr map flatten map_lgl
248238
#' @importFrom dplyr filter pull
249239
#' @importFrom stats setNames
250-
#' @keywords internal
251240
get_mdls_with_signft_covars <- function (outp_smry_ls, params_ls_ls)
252241
{
253242
signft_covars_chr <- outp_smry_ls$mdls_with_covars_smry_tb %>%
@@ -272,7 +261,6 @@ get_mdls_with_signft_covars <- function (outp_smry_ls, params_ls_ls)
272261
#' @export
273262
#' @importFrom purrr map_int
274263
#' @importFrom xfun numbers_to_words
275-
#' @keywords internal
276264
get_nbr_of_predrs <- function (results_ls, as_words_1L_lgl = T)
277265
{
278266
nbr_of_predrs_xx <- results_ls$study_descs_ls$predr_ctgs_ls %>%
@@ -291,7 +279,6 @@ get_nbr_of_predrs <- function (results_ls, as_words_1L_lgl = T)
291279
#' @importFrom purrr map_lgl map2_chr
292280
#' @importFrom xfun numbers_to_words
293281
#' @importFrom stringi stri_replace_last_fixed
294-
#' @keywords internal
295282
get_nbr_of_predrs_by_ctg <- function (results_ls)
296283
{
297284
multiple_1L_lgl <- length(get_predr_ctgs(results_ls, collapse_1L_lgl = F) >
@@ -317,7 +304,6 @@ get_nbr_of_predrs_by_ctg <- function (results_ls)
317304
#' @export
318305
#' @importFrom xfun numbers_to_words
319306
#' @importFrom Hmisc capitalize
320-
#' @keywords internal
321307
get_nbr_of_scndry_analyses <- function (results_ls, as_words_1L_lgl = T, capitalise_1L_lgl = T)
322308
{
323309
nbr_of_scndry_analyses_1L_xx <- names(results_ls$mdl_ingredients_ls) %>%
@@ -341,7 +327,6 @@ get_nbr_of_scndry_analyses <- function (results_ls, as_words_1L_lgl = T, capital
341327
#' @rdname get_ordered_sngl_csnl_mdls
342328
#' @export
343329
#' @importFrom stringi stri_replace_last
344-
#' @keywords internal
345330
get_ordered_sngl_csnl_mdls <- function (results_ls, select_int = NULL, collapse_1L_lgl = F)
346331
{
347332
ordered_sngl_csnl_mdls_chr <- results_ls$ttu_cs_ls$cs_mdls_predrs_seq_dscdng_chr
@@ -362,7 +347,6 @@ get_ordered_sngl_csnl_mdls <- function (results_ls, select_int = NULL, collapse_
362347
#' @rdname get_popl_descvs
363348
#' @export
364349
#' @importFrom stringi stri_replace_last_fixed
365-
#' @keywords internal
366350
get_popl_descvs <- function (results_ls)
367351
{
368352
popl_descvs_1L_chr <- results_ls$tables_ls$participant_descs$variable %>%
@@ -379,7 +363,6 @@ get_popl_descvs <- function (results_ls)
379363
#' @export
380364
#' @importFrom purrr map_int
381365
#' @importFrom stringi stri_replace_last_fixed
382-
#' @keywords internal
383366
get_predr_ctgs <- function (results_ls, collapse_1L_lgl = T)
384367
{
385368
predr_ctgs_chr <- (results_ls$study_descs_ls$predr_ctgs_ls %>%
@@ -406,7 +389,6 @@ get_predr_ctgs <- function (results_ls, collapse_1L_lgl = T)
406389
#' @importFrom Hmisc capitalize
407390
#' @importFrom ready4fun get_from_lup_obj
408391
#' @importFrom stringi stri_replace_last_fixed stri_replace_last
409-
#' @keywords internal
410392
get_predrs_by_ctg <- function (results_ls, long_desc_1L_lgl = F, transform_1L_lgl = F,
411393
collapse_1L_lgl = F)
412394
{
@@ -453,7 +435,6 @@ get_predrs_by_ctg <- function (results_ls, long_desc_1L_lgl = F, transform_1L_lg
453435
#' @rdname get_prefd_mdl_predrs
454436
#' @export
455437
#' @importFrom stringi stri_replace_last
456-
#' @keywords internal
457438
get_prefd_mdl_predrs <- function (results_ls)
458439
{
459440
predrs_1L_chr <- results_ls$predr_var_nms_chr %>% paste0(collapse = ", ") %>%
@@ -492,7 +473,6 @@ get_random_intercept <- function (mdls_smry_tb, mdl_nm_1L_chr, deterministic_1L_
492473
#' @importFrom ready4fun get_from_lup_obj
493474
#' @importFrom ready4use remove_labels_from_ds
494475
#' @importFrom stringi stri_replace_last_fixed
495-
#' @keywords internal
496476
get_scndry_anlys_descs <- function (results_ls)
497477
{
498478
nbr_of_scndry_analyses_1L_int <- get_nbr_of_scndry_analyses(results_ls,
@@ -529,7 +509,6 @@ get_scndry_anlys_descs <- function (results_ls)
529509
#' @export
530510
#' @importFrom purrr pmap_chr
531511
#' @importFrom stringi stri_replace_last
532-
#' @keywords internal
533512
get_selected_mixed_mdls <- function (results_ls, collapse_1L_lgl = T)
534513
{
535514
mixed_mdls_xx <- results_ls$ttu_lngl_ls$best_mdls_tb %>%

0 commit comments

Comments
 (0)