Skip to content

Instantly share code, notes, and snippets.

@djnavarro
Created September 22, 2019 01:08
Show Gist options
  • Save djnavarro/34186ba8e9478a868b1bfcf24fa799cf to your computer and use it in GitHub Desktop.
Save djnavarro/34186ba8e9478a868b1bfcf24fa799cf to your computer and use it in GitHub Desktop.
library(DiagrammeR)
g <- DiagrammeR("
graph TB
A[Is this tweet about #rstats?]-->|yes|B[Hell yeah tweet it honey!]
A-->|no|C[Is a statistics tweet?]
C-->|yes|D[Is it about statistics in psychology?]
D-->|no|B
D-->|yes|E[Are you prepared for a pointlessly heated argument?]
E-->|um...no|F[ARE YOU CRAZY? DO NOT TWEET THIS]
E-->|ye...es?|H[Fine tweet away. It's your funeral sweetie]
C-->|nope|G[Does it have any connection to open science?]
G-->|yeah|E
G-->|no|I[Are you asking people to be kind?]
I-->|yes|E
I-->|no|J[Is this tweet about sexual assault, misogyny or similar?]
J-->|yes|E
J-->|no|K[Is it a selfie?]
K-->|yes|L[Sure, why not?]
K-->|no|M[You have accessed my account illegally]
")
print(g)
library(DiagrammeR)
g <- DiagrammeR("
graph TB
A[Is this tweet about #rstats?]-->|yes|B[Hell yeah tweet it honey!]
A-->|no|C[Is a statistics tweet?]
C-->|yes|D[Is it about statistics in psychology?]
D-->|no|B
D-->|yes|E[Are you prepared for a pointlessly heated argument?]
E-->|um...no|F[ARE YOU CRAZY? DO NOT TWEET THIS]
E-->|ye...es?|H[Fine tweet away. It's your funeral sweetie]
C-->|nope|G[Does it have any connection to open science?]
G-->|yeah|E
G-->|no|I[Are you asking people to be kind?]
I-->|yes|E
I-->|no|J[Is this tweet about sexual assault, misogyny or similar?]
J-->|yes|E
J-->|no|K[Is it a selfie?]
K-->|yes|L[Sure, why not?]
K-->|no|M[You have accessed my account illegally]
")
print(g)
@djnavarro
Copy link
Author

diagrammer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment