I made a mistake and tried to check adjustment from a plot instead of the of the DAG and there was an unexpected error:
library("dagitty")
library("ggdag")
#>
#> Attaching package: 'ggdag'
#> The following object is masked from 'package:stats':
#>
#> filter
dag <- dagitty("dag{
a -> b b -> c c -> d
}")
plot <- ggdag(dag) +
theme_dag() + theme_dag_gray()
ggdag_adjustment_set(plot, outcome = "a")
#> Error in if (class(x) == "dagitty") {: the condition has length > 1
I made a mistake and tried to check adjustment from a plot instead of the of the DAG and there was an unexpected error:
I think this could be just a simple case of replacing
class(x)
byis(x, "dagitty")
in https://github.com/jtextor/dagitty/blob/ca4ec745ccfeaf8d283543c978e3691178748279/r/R/dagitty.r#L2625Created on 2023-01-20 with reprex v2.0.2