diff --git a/R/parse_formula.R b/R/parse_formula.R index 23b0347..d33809f 100644 --- a/R/parse_formula.R +++ b/R/parse_formula.R @@ -35,14 +35,14 @@ get_treatment_name <- function(formula) { #' Get mean names #' -#' @param dat Data +#' @template args-ald #' @param var_names Variable names #' -#' @return Mean names +#' @return Mean names vector #' @keywords internal #' -get_mean_names <- function(dat, var_names) { - dat_names <- names(dat) +get_mean_names <- function(ald, var_names) { + dat_names <- names(ald) # is_sd_name <- grepl(pattern = "\\.mean", dat_names) is_mean_name <- grepl(pattern = "mean\\.", dat_names) is_var_name <- grepl(pattern = paste(var_names, collapse = "|"), dat_names) @@ -50,16 +50,16 @@ get_mean_names <- function(dat, var_names) { dat_names[is_mean_name & is_var_name] } -#' Get SD names +#' Get standard deviation names #' -#' @param dat +#' @template args-ald #' @param var_names #' -#' @return SD names +#' @return Standard deviation names vector #' @keywords internal #' -get_sd_names <- function(dat, var_names) { - dat_names <- names(dat) +get_sd_names <- function(ald, var_names) { + dat_names <- names(ald) # is_sd_name <- grepl(pattern = "\\.sd", dat_names) is_sd_name <- grepl(pattern = "sd\\.", dat_names) is_var_name <- grepl(pattern = paste(var_names, collapse = "|"), dat_names) @@ -71,7 +71,7 @@ get_sd_names <- function(dat, var_names) { #' #' @param formula Linear regression formula #' -#' @return covariate names +#' @return covariate names vector #' @keywords internal #' get_covariate_names <- function(formula) {