#----------------------------------------------------------------------------#
#' Convert a character vector into a formula object.
#' @export
#' @param TBC
#' @return TBC
#' @examples
#' TBC
form <- function(var_list, formula=TRUE) {
temp_var <- paste0(var_list, collapse=" + ")
if (formula==TRUE) {
temp_formula <- as.formula(paste0("~ ", temp_var))
return(temp_formula)
} else {
return(temp_var)
}
}
#----------------------------------------------------------------------------#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.