Skip to content

Commit 5705ff3

Browse files
updated naming conventions and docs
1 parent 212264a commit 5705ff3

168 files changed

Lines changed: 2777 additions & 1986 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.

.Rbuildignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,12 @@
6969
^data-raw/vignettes/_AQoL_6D_Syn_Pop\.Rmd$
7070
^doc$
7171
^Meta$
72+
^data-raw/dataverse/abbreviations_lup/abbreviations_lup\.csv$
73+
^data-raw/dataverse/abbreviations_lup/abbreviations_lup\.RDS$
74+
^data-raw/dataverse/fn_type_lup_tb/fn_type_lup_tb\.csv$
75+
^data-raw/dataverse/fn_type_lup_tb/fn_type_lup_tb\.RDS$
76+
^data-raw/MAKE_CLASSES\.R$
77+
^data-raw/MAKE_HOUSESTYLE_DSS\.R$
78+
^data-raw/dataverse/prototype_lup/prototype_lup\.csv$
79+
^data-raw/dataverse/prototype_lup/prototype_lup\.RDS$
80+
^data-raw/extra_abbrs\.txt$

NAMESPACE

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
export("%>%")
44
export(TTU_predictors_lup)
5-
export(add_cors_and_uts_to_aqol6d_tbs_ls)
5+
export(add_cors_and_utls_to_aqol6d_tbs_ls)
66
export(add_interval_var)
77
export(add_labels_to_aqol6d_tb)
88
export(add_uids_to_tbs_ls)
99
export(add_utility_predn_to_ds)
10-
export(calculate_dep_var_tfmn)
10+
export(calculate_dpnt_var_tfmn)
1111
export(calculate_rmse)
1212
export(calculate_rmse_tfmn)
1313
export(fit_clg_log_tfmn)
@@ -23,15 +23,15 @@ export(make_aqol6d_fns_ls)
2323
export(make_aqol6d_items_tb)
2424
export(make_brms_mdl_print_ls)
2525
export(make_brms_mdl_smry_tbl)
26-
export(make_complete_props_tbs_ls)
26+
export(make_complete_prpns_tbs_ls)
2727
export(make_correlated_data_tb)
2828
export(make_corstars_tbl_xx)
2929
export(make_dim_sclg_cons_dbl)
3030
export(make_domain_items_ls)
3131
export(make_fake_ts_data)
3232
export(make_folds_ls)
33-
export(make_item_wrst_wghts_ls_ls)
3433
export(make_knit_pars_ls)
34+
export(make_make_item_wrst_wts_ls_ls)
3535
export(make_mdl)
3636
export(make_mdl_nms_ls)
3737
export(make_mdl_smry_elmt_tbl)
@@ -44,16 +44,16 @@ export(make_prefd_mdls_vec)
4444
export(make_pt_TTU_predictors_lup)
4545
export(make_shareable_mdl)
4646
export(make_smry_of_brm_mdl)
47-
export(make_smry_of_mdl)
48-
export(make_smry_of_ts_mdl)
47+
export(make_smry_of_mdl_outp)
48+
export(make_smry_of_ts_mdl_outp)
4949
export(make_synth_series_tbs_ls)
5050
export(make_unique_ls_elmt_idx_int)
51-
export(make_vec_with_sum_of_int)
51+
export(make_vec_with_sum_of_int_val)
5252
export(plot_auto_lm)
5353
export(plot_lnr_cmprsn)
54-
export(plot_lnr_cmprsn_sctr_plt)
5554
export(plot_obsd_predd_dnst)
56-
export(plot_obsd_predd_sctr)
55+
export(plot_obsd_predd_sctr_cmprsn)
56+
export(plot_sctr_plt_cmprsn)
5757
export(predict_utility)
5858
export(print_all_plts_for_mdl_set)
5959
export(print_ts_mdl_plts)
@@ -63,8 +63,8 @@ export(reorder_tbs_for_target_cors)
6363
export(replace_with_missing_vals)
6464
export(scramble_xx)
6565
export(transform_data_tb_for_cmprsn)
66-
export(transform_dep_var_nm)
67-
export(transform_dep_var_nm_for_cll)
66+
export(transform_depnt_var_nm)
67+
export(transform_depnt_var_nm_for_cll)
6868
export(transform_ds_for_mdlng)
6969
export(transform_ds_for_tstng)
7070
export(transform_mdl_vars_with_clss)
@@ -75,14 +75,14 @@ export(write_all_alg_outps)
7575
export(write_box_cox_tfmn)
7676
export(write_brm_mdl_plt_fl)
7777
export(write_brm_model_plts)
78-
export(write_mdl_cmprsns)
78+
export(write_mdl_cmprsn)
7979
export(write_mdl_plts)
8080
export(write_mdl_type_covars_mdls)
8181
export(write_mdl_type_multi_outps)
8282
export(write_mdl_type_sngl_outps)
83-
export(write_mdls_with_covars_cmprsns)
83+
export(write_mdls_with_covars_cmprsn)
8484
export(write_new_outp_dir)
85-
export(write_predr_and_covars_cmprsns)
85+
export(write_predr_and_covars_cmprsn)
8686
export(write_predr_and_mdl_tstng_results)
8787
export(write_predr_cmprsn_outps)
8888
export(write_results_to_csv)

R/C3_TTU_predictors_lup.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ x
2929
#' @description Create a new prototype for the TTU S3 class for candidate predictors lookup table
3030
#' @param short_name_chr Short name (a character vector), Default: character(0)
3131
#' @param long_name_chr Long name (a character vector), Default: character(0)
32-
#' @param min_val_dbl Min value (a double vector), Default: numeric(0)
33-
#' @param max_val_dbl Max value (a double vector), Default: numeric(0)
32+
#' @param min_val_dbl Minimum value (a double vector), Default: numeric(0)
33+
#' @param max_val_dbl Maximum value (a double vector), Default: numeric(0)
3434
#' @param class_chr Class (a character vector), Default: character(0)
3535
#' @param increment_dbl Increment (a double vector), Default: numeric(0)
3636
#' @param class_fn_chr Class function (a character vector), Default: character(0)
37-
#' @param mdl_scaling_dbl Mdl scaling (a double vector), Default: numeric(0)
37+
#' @param mdl_scaling_dbl Model scaling (a double vector), Default: numeric(0)
3838
#' @param covariate_lgl Covariate (a logical vector), Default: logical(0)
3939
#' @return A prototype for TTU S3 class for candidate predictors lookup table
4040
#' @details TTU S3 class for candidate predictors lookup table
@@ -81,6 +81,7 @@ stop(paste0("TIBBLE must include columns named: ",
8181
names(make_pt_TTU_predictors_lup()) %>% stringr::str_c(sep="", collapse = ", ")),
8282
call. = FALSE)
8383
}
84+
8485
if(!identical(make_pt_TTU_predictors_lup() %>%
8586
dplyr::summarise_all(class) %>%
8687
tidyr::gather(variable,class) %>%
@@ -102,6 +103,7 @@ dplyr::pull(2),
102103
stringr::str_c(sep="", collapse = ", ")),
103104
call. = FALSE)
104105
}
106+
105107
x}
106108
#' Is TTU S3 class for candidate predictors lookup table
107109
#' @description Check whether an object is a valid instance of the TTU S3 class for candidate predictors lookup table

R/db_abbreviations_lup.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
#' \item{long_name_chr}{Long name (a character vector)}
1010
#' \item{plural_lgl}{Plural (a logical vector)}
1111
#' }
12+
#' @source \url{https://doi.org/10.7910/DVN/2Y9VF9}
1213
"abbreviations_lup"

R/db_fn_type_lup_tb.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
#' \item{is_generic_lgl}{Is generic (a logical vector)}
1313
#' \item{is_method_lgl}{Is method (a logical vector)}
1414
#' }
15+
#' @source \url{https://doi.org/10.7910/DVN/2Y9VF9}
1516
"fn_type_lup_tb"

R/db_mdl_types_lup.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#' \item{family_chr}{Family (a character vector)}
1212
#' \item{fn_chr}{Function (a character vector)}
1313
#' \item{start_chr}{Start (a character vector)}
14-
#' \item{pred_type_chr}{Pred type (a character vector)}
14+
#' \item{predn_type_chr}{Prediction type (a character vector)}
1515
#' \item{tfmn_chr}{Transformation (a character vector)}
16-
#' \item{tfmn_for_bnml_lgl}{Transformation for bnml (a logical vector)}
16+
#' \item{tfmn_for_bnml_lgl}{Transformation for binomial (a logical vector)}
1717
#' }
1818
"mdl_types_lup"

R/db_predictors_lup.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#' \describe{
88
#' \item{short_name_chr}{Short name (a character vector)}
99
#' \item{long_name_chr}{Long name (a character vector)}
10-
#' \item{min_val_dbl}{Min value (a double vector)}
11-
#' \item{max_val_dbl}{Max value (a double vector)}
10+
#' \item{min_val_dbl}{Minimum value (a double vector)}
11+
#' \item{max_val_dbl}{Maximum value (a double vector)}
1212
#' \item{class_chr}{Class (a character vector)}
1313
#' \item{increment_dbl}{Increment (a double vector)}
1414
#' \item{class_fn_chr}{Class function (a character vector)}

R/db_prototype_lup.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
#'
77
#' \describe{
88
#' \item{type_chr}{Type (a character vector)}
9-
#' \item{val_chr}{Val (a character vector)}
9+
#' \item{val_chr}{Value (a character vector)}
1010
#' \item{pt_ns_chr}{Prototype namespace (a character vector)}
1111
#' \item{fn_to_call_chr}{Function to call (a character vector)}
12-
#' \item{default_val_chr}{Default val (a character vector)}
12+
#' \item{default_val_chr}{Default value (a character vector)}
1313
#' \item{old_class_lgl}{Old class (a logical vector)}
1414
#' }
1515
"prototype_lup"

R/db_rprt_lup.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
#' \describe{
88
#' \item{rprt_nms_chr}{Report names (a character vector)}
99
#' \item{title_chr}{Title (a character vector)}
10-
#' \item{paths_to_RMD_dir_1L_chr}{Paths toMD directory (a character vector of length one)}
10+
#' \item{paths_to_rmd_dir_1L_chr}{Paths to Markdown directory (a character vector of length one)}
1111
#' \item{pkg_dirs_chr}{Package directories (a character vector)}
1212
#' \item{packages_chr}{Packages (a character vector)}
13-
#' \item{nms_of_RMD_chr}{Names ofMD (a character vector)}
14-
#' \item{rltv_paths_to_outpt_yaml_chr}{Rltv paths to outpt yaml (a character vector)}
13+
#' \item{nms_of_rmd_chr}{Names of Markdown (a character vector)}
14+
#' \item{rltv_paths_to_outpt_yaml_chr}{Relative paths to outpt yaml (a character vector)}
1515
#' }
1616
"rprt_lup"

R/fn_add.R

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
#' Add correlations and utilities to Assessment of Quality of Life Six Dimension tibbles
2-
#' @description add_cors_and_uts_to_aqol6d_tbs_ls() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add correlations and utilities to assessment of quality of life six dimension tibbles list. Function argument aqol6d_tbs_ls specifies the object to be updated. The function returns Assessment of Quality of Life Six Dimension tibbles (a list).
2+
#' @description add_cors_and_utls_to_aqol6d_tbs_ls() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add correlations and utilities to assessment of quality of life six dimension tibbles list. Function argument aqol6d_tbs_ls specifies the object to be updated. The function returns Assessment of Quality of Life Six Dimension tibbles (a list).
33
#' @param aqol6d_tbs_ls Assessment of Quality of Life Six Dimension tibbles (a list)
44
#' @param aqol_scores_pars_ls Assessment of Quality of Life scores parameters (a list)
5-
#' @param aqol_items_props_tbs_ls Assessment of Quality of Life items props tibbles (a list)
5+
#' @param aqol_items_prpns_tbs_ls Assessment of Quality of Life items proportions tibbles (a list)
66
#' @param temporal_cors_ls Temporal correlations (a list)
77
#' @param prefix_chr Prefix (a character vector)
8-
#' @param aqol_tots_var_nms_chr Assessment of Quality of Life totals var names (a character vector)
9-
#' @param id_var_nm_1L_chr Id var name (a character vector of length one), Default: 'fkClientID'
8+
#' @param aqol_tots_var_nms_chr Assessment of Quality of Life totals variable names (a character vector)
9+
#' @param id_var_nm_1L_chr Identity variable name (a character vector of length one), Default: 'fkClientID'
1010
#' @return Assessment of Quality of Life Six Dimension tibbles (a list)
11-
#' @rdname add_cors_and_uts_to_aqol6d_tbs_ls
11+
#' @rdname add_cors_and_utls_to_aqol6d_tbs_ls
1212
#' @export
1313

1414
#' @keywords internal
15-
add_cors_and_uts_to_aqol6d_tbs_ls <- function (aqol6d_tbs_ls, aqol_scores_pars_ls, aqol_items_props_tbs_ls,
15+
add_cors_and_utls_to_aqol6d_tbs_ls <- function (aqol6d_tbs_ls, aqol_scores_pars_ls, aqol_items_prpns_tbs_ls,
1616
temporal_cors_ls, prefix_chr, aqol_tots_var_nms_chr, id_var_nm_1L_chr = "fkClientID")
1717
{
1818
aqol6d_tbs_ls <- reorder_tbs_for_target_cors(aqol6d_tbs_ls,
1919
cor_dbl = temporal_cors_ls[[1]], cor_var_chr = rep(names(temporal_cors_ls)[1],
2020
2), id_var_to_rm_1L_chr = "id") %>% add_uids_to_tbs_ls(prefix_1L_chr = prefix_chr[["uid"]],
2121
id_var_nm_1L_chr = id_var_nm_1L_chr)
22-
aqol6d_tbs_ls <- aqol6d_tbs_ls %>% add_aqol6d_items_to_aqol6d_tbs_ls(aqol_items_props_tbs_ls = aqol_items_props_tbs_ls,
22+
aqol6d_tbs_ls <- aqol6d_tbs_ls %>% add_aqol6d_items_to_aqol6d_tbs_ls(aqol_items_prpns_tbs_ls = aqol_items_prpns_tbs_ls,
2323
prefix_chr = prefix_chr, aqol_tots_var_nms_chr = aqol_tots_var_nms_chr,
2424
id_var_nm_1L_chr = id_var_nm_1L_chr)
2525
return(aqol6d_tbs_ls)
2626
}
27-
#' Add interval var
28-
#' @description add_interval_var() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add interval var. Function argument data_tb specifies the object to be updated. The function returns Updated data (a tibble).
27+
#' Add interval variable
28+
#' @description add_interval_var() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add interval variable. Function argument data_tb specifies the object to be updated. The function returns Updated data (a tibble).
2929
#' @param data_tb Data (a tibble)
30-
#' @param id_var_nm_1L_chr Id var name (a character vector of length one), Default: 'fkClientID'
31-
#' @param msrmnt_date_var_nm_1L_chr Msrmnt date var name (a character vector of length one), Default: 'd_interview_date'
30+
#' @param id_var_nm_1L_chr Identity variable name (a character vector of length one), Default: 'fkClientID'
31+
#' @param msrmnt_date_var_nm_1L_chr Measurement date variable name (a character vector of length one), Default: 'd_interview_date'
3232
#' @param time_unit_1L_chr Time unit (a character vector of length one), Default: 'days'
33-
#' @param bl_date_var_nm_1L_chr Bl date var name (a character vector of length one), Default: 'bl_date_dtm'
34-
#' @param interval_var_nm_1L_chr Interval var name (a character vector of length one), Default: 'interval_dbl'
35-
#' @param temp_row_nbr_var_nm_1L_chr Temp row nbr var name (a character vector of length one), Default: 'temp_row_nbr_int'
36-
#' @param drop_bl_date_var PARAM_DESCRIPTION, Default: F
33+
#' @param bl_date_var_nm_1L_chr Baseline date variable name (a character vector of length one), Default: 'bl_date_dtm'
34+
#' @param interval_var_nm_1L_chr Interval variable name (a character vector of length one), Default: 'interval_dbl'
35+
#' @param temp_row_nbr_var_nm_1L_chr Temporary row number variable name (a character vector of length one), Default: 'temp_row_nbr_int'
36+
#' @param drop_bl_date_var_1L_lgl Drop baseline date variable (a logical vector of length one), Default: F
3737
#' @return Updated data (a tibble)
3838
#' @rdname add_interval_var
3939
#' @export
@@ -44,7 +44,7 @@ add_cors_and_uts_to_aqol6d_tbs_ls <- function (aqol6d_tbs_ls, aqol_scores_pars_l
4444
add_interval_var <- function (data_tb, id_var_nm_1L_chr = "fkClientID", msrmnt_date_var_nm_1L_chr = "d_interview_date",
4545
time_unit_1L_chr = "days", bl_date_var_nm_1L_chr = "bl_date_dtm",
4646
interval_var_nm_1L_chr = "interval_dbl", temp_row_nbr_var_nm_1L_chr = "temp_row_nbr_int",
47-
drop_bl_date_var = F)
47+
drop_bl_date_var_1L_lgl = F)
4848
{
4949
updated_data_tb <- data_tb %>% dplyr::ungroup() %>% dplyr::mutate(`:=`(!!rlang::sym(temp_row_nbr_var_nm_1L_chr),
5050
1:dplyr::n())) %>% dplyr::group_by(!!rlang::sym(id_var_nm_1L_chr)) %>%
@@ -56,7 +56,7 @@ add_interval_var <- function (data_tb, id_var_nm_1L_chr = "fkClientID", msrmnt_d
5656
.y) %>% lubridate::time_length(unit = time_unit_1L_chr))) %>%
5757
dplyr::ungroup() %>% dplyr::arrange(!!rlang::sym(temp_row_nbr_var_nm_1L_chr)) %>%
5858
dplyr::select(-!!rlang::sym(temp_row_nbr_var_nm_1L_chr))
59-
if (drop_bl_date_var)
59+
if (drop_bl_date_var_1L_lgl)
6060
updated_data_tb <- updated_data_tb %>% dplyr::select(-!!rlang::sym(bl_date_var_nm_1L_chr))
6161
return(updated_data_tb)
6262
}
@@ -108,7 +108,7 @@ add_labels_to_aqol6d_tb <- function (aqol6d_tb, labels_chr = NA_character_)
108108
#' @description add_uids_to_tbs_ls() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add unique identifiers to tibbles list. Function argument tbs_ls specifies the object to be updated. The function returns Tibbles (a list).
109109
#' @param tbs_ls Tibbles (a list)
110110
#' @param prefix_1L_chr Prefix (a character vector of length one)
111-
#' @param id_var_nm_1L_chr Id var name (a character vector of length one), Default: 'fkClientID'
111+
#' @param id_var_nm_1L_chr Identity variable name (a character vector of length one), Default: 'fkClientID'
112112
#' @return Tibbles (a list)
113113
#' @rdname add_uids_to_tbs_ls
114114
#' @export
@@ -135,43 +135,43 @@ add_uids_to_tbs_ls <- function (tbs_ls, prefix_1L_chr, id_var_nm_1L_chr = "fkCli
135135
#' Add utility prediction to dataset
136136
#' @description add_utility_predn_to_ds() is an Add function that updates an object by adding data to that object. Specifically, this function implements an algorithm to add utility prediction to dataset. Function argument data_tb specifies the object to be updated. The function returns Data (a tibble).
137137
#' @param data_tb Data (a tibble)
138-
#' @param model_mdl PARAM_DESCRIPTION
138+
#' @param model_mdl Model (a model)
139139
#' @param tfmn_1L_chr Transformation (a character vector of length one)
140-
#' @param dep_var_nm_1L_chr Dep var name (a character vector of length one)
141-
#' @param predr_vars_nms_chr Predr vars names (a character vector), Default: NULL
142-
#' @param force_min_max_1L_lgl Force min max (a logical vector of length one), Default: T
143-
#' @param utl_min_val_1L_dbl Utl min value (a double vector of length one), Default: 0.03
140+
#' @param depnt_var_nm_1L_chr Dependent variable name (a character vector of length one)
141+
#' @param predr_vars_nms_chr Predictor variables names (a character vector), Default: NULL
142+
#' @param force_min_max_1L_lgl Force minimum maximum (a logical vector of length one), Default: T
143+
#' @param utl_min_val_1L_dbl Utility minimum value (a double vector of length one), Default: 0.03
144144
#' @param impute_1L_lgl Impute (a logical vector of length one), Default: T
145-
#' @param utl_cls_fn Utl class (a function), Default: NULL
146-
#' @param rmv_tfmd_dep_var_1L_lgl Rmv tfmd dep var (a logical vector of length one), Default: F
145+
#' @param utl_cls_fn Utility class (a function), Default: NULL
146+
#' @param rmv_tfd_depnt_var_1L_lgl Remove transformed dependent variable (a logical vector of length one), Default: F
147147
#' @return Data (a tibble)
148148
#' @rdname add_utility_predn_to_ds
149149
#' @export
150150
#' @importFrom purrr reduce map flatten_chr
151151
#' @importFrom dplyr mutate select
152152
#' @importFrom rlang sym
153153
#' @importFrom tidyselect all_of
154-
add_utility_predn_to_ds <- function (data_tb, model_mdl, tfmn_1L_chr, dep_var_nm_1L_chr,
154+
add_utility_predn_to_ds <- function (data_tb, model_mdl, tfmn_1L_chr, depnt_var_nm_1L_chr,
155155
predr_vars_nms_chr = NULL, force_min_max_1L_lgl = T, utl_min_val_1L_dbl = 0.03,
156-
impute_1L_lgl = T, utl_cls_fn = NULL, rmv_tfmd_dep_var_1L_lgl = F)
156+
impute_1L_lgl = T, utl_cls_fn = NULL, rmv_tfd_depnt_var_1L_lgl = F)
157157
{
158-
dep_vars_chr <- c(dep_var_nm_1L_chr, transform_dep_var_nm(dep_var_nm_1L_chr = dep_var_nm_1L_chr,
158+
dep_vars_chr <- c(depnt_var_nm_1L_chr, transform_depnt_var_nm(depnt_var_nm_1L_chr = depnt_var_nm_1L_chr,
159159
tfmn_1L_chr = tfmn_1L_chr)) %>% unique()
160160
data_tb <- purrr::reduce(dep_vars_chr, .init = data_tb, ~dplyr::mutate(.x,
161161
`:=`(!!rlang::sym(.y), NA_real_)))
162162
predictions_dbl <- predict_utility(data_tb = data_tb, tfmn_1L_chr = tfmn_1L_chr,
163163
model_mdl = model_mdl, force_min_max_1L_lgl = force_min_max_1L_lgl,
164164
utl_min_val_1L_dbl = utl_min_val_1L_dbl, impute_1L_lgl = impute_1L_lgl,
165165
utl_cls_fn = utl_cls_fn)
166-
data_tb <- data_tb %>% dplyr::mutate(`:=`(!!rlang::sym(dep_var_nm_1L_chr),
166+
data_tb <- data_tb %>% dplyr::mutate(`:=`(!!rlang::sym(depnt_var_nm_1L_chr),
167167
predictions_dbl))
168168
if (!is.null(predr_vars_nms_chr)) {
169169
data_tb <- data_tb %>% dplyr::select(-tidyselect::all_of(purrr::map(predr_vars_nms_chr,
170170
~paste0(.x, c("_baseline", "_change"))) %>% purrr::flatten_chr()))
171171
}
172-
if (rmv_tfmd_dep_var_1L_lgl) {
172+
if (rmv_tfd_depnt_var_1L_lgl) {
173173
data_tb <- data_tb %>% dplyr::select(-tidyselect::all_of(dep_vars_chr[dep_vars_chr !=
174-
dep_var_nm_1L_chr]))
174+
depnt_var_nm_1L_chr]))
175175
}
176176
return(data_tb)
177177
}

0 commit comments

Comments
 (0)