MyNixOS website logo
Description

Pedigree Mermaid Syntax.

Generate Mermaid syntax for a pedigree flowchart from a pedigree data frame. Mermaid syntax is commonly used to generate plots, charts, diagrams, and flowcharts. It is a textual syntax for creating reproducible illustrations. This package generates Mermaid syntax from a pedigree data frame to visualize a pedigree flowchart. The Mermaid syntax can be embedded in a Markdown or R Markdown file, or viewed on Mermaid editors and renderers. Links' shape, style, and orientation can be customized via function arguments, and nodes' shapes and styles can be customized via optional columns in the pedigree data frame.

pedMermaid

R-CMD-check cran-version-last-release cran-downloads github-release github-license github-contributors

R package pedMermaid generates Mermaid syntax for creating a pedigree flowchart in Markdown and R Markdown, from a pedigree data frame.

Installation

You can install the development version of pedMermaid like so:

devtools::install_github('nilforooshan/ggroups')

Example

This is a basic example of a pedigree flowchart created by the Mermaid syntax generated by the R package pedMermaid.

library(pedMermaid)
ped <- data.frame(ID = 1:7,
                  SIRE = c(0, 0, 1, 0, 3, 0, 5),
                  DAM = c(0, 0, 2, 2, 4, 0, 6))
x <- mermaid_md(ped)
# cat(x, sep = "\n") # Display the output syntax on-screen
flowchart TB
    1 & 2 --> 3
    2 --> 4
    3 & 4 --> 5
    5 & 6 --> 7

R package pedMermaid is equipped with functions mermaid_md and mermaid_rmd for generating Mermaid flowchart syntax for Markdown and R Markdown, respectively. The syntax generated by mermaid_rmd is also applicable to Markdown. However, the syntax is more restricted (less customizations) and less compact. The mermaid_md function provides the following customizations:

  • Links
    • Orientation (top-to-bottom or left-to-right)
    • Type (arrow or line)
    • Curve (not supported by mermaid_rmd)
    • Dash (dashed or solid) (not supported by mermaid_rmd)
    • Line width (not supported by mermaid_rmd)
    • Color (not supported by mermaid_rmd)
  • Nodes (node-specific)
    • Text color (not supported by mermaid_rmd)
    • Background color
    • Border color
    • Round border
    • Dashed (or solid) border
    • Line width of the border.
Metadata

Version

1.0.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows