You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the coordinates API is unclear, as several people (myself included) have stumbled over it or missed it altogether. I think this needs a few changes:
Examples in the new customizing DAGs vignette
A separate function that can specify coordinates, something like dag_coords() that will override dagitty object coords and, if it's already tidied, update the tidy_dag coords.
However, I need to think about the second item more
The text was updated successfully, but these errors were encountered:
FWIW, I think the API is very straightforward and natural. But it would be nice to have an example with a data.frame or tribble in the documentation. Personally, I tend to specify coordinates using something like this, since it makes the X-Y coordinates clearer:
library(ggdag)
coords<- read.table(header=TRUE, text=" x y name 0 0 X 1 0 Z 2 0 Y 1 1 U")
d<- dagify(
X~U,
Z~X,
Y~Z,
Y~U,
coords=coords)
ggdag(d)
I agree that this way is much clearer and should be more evident in the docs. I think any improvements will center around using the data frame approach
I think the coordinates API is unclear, as several people (myself included) have stumbled over it or missed it altogether. I think this needs a few changes:
dag_coords()
that will overridedagitty
object coords and, if it's already tidied, update thetidy_dag
coords.However, I need to think about the second item more
The text was updated successfully, but these errors were encountered: