From fed83eb98b1605ebffc5494ba1e1242de668bd0e Mon Sep 17 00:00:00 2001 From: Philip Waggoner <31326382+pdwaggoner@users.noreply.github.com> Date: Tue, 14 Jun 2022 11:00:54 -0600 Subject: [PATCH] changing case for `as.formula()` Threw error when original `as.Formula()` as it didn't recognize the function. Changed on lines: - 27 - 34 - 58 - 63 *(if you decide to use the latter two 58 and 63 in the future/uncommenting these lines)* Also, minor typo fix on line 151 too --- R/utils.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/utils.R b/R/utils.R index f319602..ddcdaaf 100644 --- a/R/utils.R +++ b/R/utils.R @@ -24,14 +24,14 @@ construct_formulas <- function(f, vars){ } else { - f <- as.Formula(f) + f <- as.formula(f) K <- length(f)[1] formulas <- list() for(i in 1:K){ - nf <- formula(as.Formula(f),lhs=i) + nf <- formula(as.formula(f),lhs=i) nf <- expand_rhs_dot(nf, all_vars=vars) nf <- update.formula(nf, paste(" . ~ . -", all.vars(nf)[1]), @@ -55,12 +55,12 @@ construct_formulas <- function(f, vars){ # # } else { # -# f <- as.Formula(f) +# f <- as.formula(f) # K <- length(f)[1] # # formulas <- list() # for(i in 1:K){ -# nf <- formula(as.Formula(f),lhs=i) +# nf <- formula(as.formula(f),lhs=i) # nf <- update.formula(nf, # paste(" . ~ . -", all.vars(nf)[1]), # evaluate=FALSE) @@ -148,7 +148,7 @@ make_categorical_cov <- function( } } - # Explicat the missing values + # Explicate the missing values for(na_var in na_vars){ if(na_var != yname){ tmp[[na_var]] <- explicat_na(tmp[[na_var]])