Skip to content
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

Refactor/revise graphviz use native dot quarto #9

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lwjohnst86
Copy link
Member

You can directly insert GraphViz images and syntax into Quarto Documents: https://quarto.org/docs/authoring/diagrams.html#graphviz so this PR (which stacks on the others) refactors all the DiagrammeR code into the native Quarto dot syntax. I also removed DiagrammeR as a package dependency.

The bonus of using this approach is that the images look much better on the website, compared to DiagrammeR. The problem with DiagrammeR is that it hasn't been updated in a while, so the graphviz version used is old.

Comment on lines +460 to +462
```{dot}
//| label: fig-intermediate-confounding
//| fig-cap: "Confounding by an intermediate pathway."
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a way to label and include a caption for this figures!

confounder of M and Y. When considering the effect on Y of changes to X
via a specific mediator M, the presence of L is challenging and
regression-based methods could no longer handle this situation.
Like @fig-intermediate-confounding below, L is influenced by the
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can reference the image anywhere in the website with this tag

@lwjohnst86 lwjohnst86 requested review from omarsilverman, arborzhang and danielibsen and removed request for omarsilverman and arborzhang May 27, 2024 09:45
Base automatically changed from style/apply-some-style-fixes to main May 27, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant