R/get_dag.R

Defines functions get_dag

Documented in get_dag

#' Title
#'
#' @param design
#'
#' @return
#' @export
#'
#' @examples
#'
#' @importFrom ggdag dagify
#' @importFrom purrr flatten
#'
get_dag <- function(design) {
  formulae <- lapply(design, get_vars_from_step) %>% unname %>% flatten
  do.call(dagify, formulae)
}
DeclareDesign/dddag documentation built on Sept. 30, 2020, 5:21 p.m.