-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix guides #152
Fix guides #152
Conversation
This change is causing an unusual bug in the status plots (or perhaps just detected by them). I thought maybe the new version of ggplot was unearthing a different bug but using the dev version of ggdag + the new ggplot works as expected library(ggdag, warn.conflicts = FALSE)
test_dag <- dagify(
y ~ x + w2 + w1,
x ~ z1 + w1,
z1 ~ w1 + v,
z2 ~ w2 + v,
w1 ~ ~w2,
exposure = "x",
outcome = "y"
)
test_dag <- tidy_dagitty(test_dag)
# right
ggdag_parents(test_dag, "x") ggdag_children(test_dag, "v") # wrong
ggdag_parents(test_dag, "y") ggdag_children(test_dag, "x") # right????
ggdag_parents(test_dag, "y", use_edges = FALSE) + geom_dag_edges() ggdag_children(test_dag, "x", use_edges = FALSE) + geom_dag_edges() Created on 2024-03-07 with reprex v2.1.0 |
It's not yet clear to me why, but this regression appears to be due to removing I still suspect that this may be unearthing a pre-existing bug on the ggdag side. |
I have a working theory on this. I think the edge geom is filtering values in some capacity that is dropping single values of either "child" or "node" but then It's not clear to me why not using an edge in |
This is fixed in tests but I do believe there is a more robust way to deal with this. I'll file another issue to explore later |
Closes #146