R/syn_da_create_formula.R

Defines functions syn_da_create_formula

## File Name: syn_da_create_formula.R
## File Version: 0.051

syn_da_create_formula <- function(wv, ord_vars)
{
    v2 <- ifelse( wv %in% ord_vars, paste0('as.factor(',wv,')'), wv )
    v2 <- paste0( v2, collapse=' + ')
    return(v2)
}

Try the miceadds package in your browser

Any scripts or data that you put into this service are public.

miceadds documentation built on March 13, 2026, 5:06 p.m.