Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/malcolmbarrett/dagtex
lightly opinionated LaTeX DAGs in R
https://github.com/malcolmbarrett/dagtex
Last synced: 16 days ago
JSON representation
lightly opinionated LaTeX DAGs in R
- Host: GitHub
- URL: https://github.com/malcolmbarrett/dagtex
- Owner: malcolmbarrett
- Created: 2019-02-21T03:47:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-12T21:14:39.000Z (over 1 year ago)
- Last Synced: 2024-10-12T21:18:58.891Z (about 1 month ago)
- Language: R
- Homepage:
- Size: 73.2 KB
- Stars: 40
- Watchers: 3
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
- jimsghstars - malcolmbarrett/dagtex - lightly opinionated LaTeX DAGs in R (R)
README
---
output: github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "35%"
)
```# dagtex
The goal of dagtex is to to create tikz DAGs from R. Under very early development and a bit of neglect.
## Installation
You can install the development version of dagtex from GitHub with:
``` r
# install.packages("remotes")
remotes::install_github("malcolmbarrett/dagtex")
```## Example
This is a basic example which shows you how to solve a common problem:```{r example}
library(dagtex)dagtex() %>%
add_node("x") %>%
add_node("y") %>%
add_edge("x", "y", is_curved = TRUE)dagtex() %>%
add_node("u1") %>%
add_node("l") %>%
add_node("a") %>%
add_node("y") %>%
add_node("u2", below = "u1") %>%
add_node("u3", below = "l") %>%
add_edge("u1", "l") %>%
add_edge("l", "a") %>%
add_edge("u1", "y", is_curved = TRUE, annotate = annotate_edge("wow")) %>%
add_edge("l", "y", is_curved = TRUE) %>%
add_edge("u2", "l", start_position = "north", end_position = "south") %>%
add_edge("u2", "a", start_position = "north", end_position = "south") %>%
add_edge("u3", "a", start_position = "north", end_position = "south") %>%
add_edge("u3", "y", start_position = "north", end_position = "south")
```