From 3831b8adc714dff14f51df5e3a9d5c60cdb14665 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 1 Oct 2024 22:49:02 +0200 Subject: [PATCH] fix --- R/check_dag.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/check_dag.R b/R/check_dag.R index 3d0ae3c2f..c8b53533f 100644 --- a/R/check_dag.R +++ b/R/check_dag.R @@ -382,7 +382,10 @@ check_dag <- function(..., # x = c(score = 5, exp = 4, b = 3, c = 3), # y = c(score = 3, exp = 3, b = 2, c = 4) # ) - if (!is.null(coords) && !is.data.frame(coords) && (length(coords) != 2 || !identical(names(coords), c("x", "y")))) { # nolint + # + # we have to check that it's not a data frame and that it is a list - + # values like `ggdag::time_ordered_coords()` returns a function, not a list + if (!is.null(coords) && !is.data.frame(coords) && is.list(coords) && (length(coords) != 2 || !identical(names(coords), c("x", "y")))) { # nolint # transform list into data frame, split x and y coordinates into columns coords <- datawizard::rownames_as_column( stats::setNames(as.data.frame(do.call(rbind, coords)), c("x", "y")),