Code to draw directed acyclic graphs (DAGs), single world intervention graphs (SWIGs), and figures for Mendelian randomization (MR) analyses.
To render index.html open index.qmd in RStudio and click the Render button or Render Website button in the Build pane.
quarto::quarto_render()
Rendered at https://remlapmot.github.io/mrdags/
To get ggdag and I think igraph to install
sudo apt-get install glpk-utils libglpk-dev
And for pdftools
sudo add-apt-repository -y ppa:cran/poppler
sudo apt-get update
sudo apt-get install -y libpoppler-cpp-dev
On macOS dvisvgm requires the ghostscript dynamically linked library libgs.dylib.
The library with Homebrew did not work under Quarto because it only included the arm64 architecture. Hence download from e.g. here and do a customised installed. This includes both arm64 and x86_64 architectures.
Run (because I have made a DESCRIPTION
file)
devtools::install_dev_deps()
The LaTeX package dvisvgm will be installed by tinytex during a render.