Getting Started

Install of R and RStudio

DiagrammeR is used in an R environment. If you don't have an R installation, it can be obtained from the R website. It is recommended that an IDE be used and the best one is undoubtedly RStudio.

R

  • Download latest release

    R is a free software environment for statistical computing and graphics. It runs on a wide variety of UNIX platforms, Mac OS X, and Windows.

RStudio

  • Download Preview Release

    RStudio is an IDE that provides a great set of tools for working in R. You get a code editor, a console, and customizable panes for package management, navigating local files, source control, and more.

Install of DiagrammeR

The DiagrammeR package can be installed as an R package in one of two ways: through GitHub using the devtools package, or, through CRAN.

GitHub

This is the version in development. It's the most up-to-date version, certainly, but it may not be as stable as the CRAN version.

devtools::install_github('rich-iannone/DiagrammeR')

CRAN

The stable release. While this is likely to be more stable than the GitHub version, CRAN releases are far less frequent.

install.packages('DiagrammeR')

DiagrammeR Version History

  • Version 0.1

    · initial release
    · incorporated into the htmlwidgets framework
    · added basic shiny app

  • Version 0.2

    · added the viz.js library to enable Graphviz support

  • Version 0.3

    · added support for the Graphviz neato, twopi, and circo engines

  • Version 0.4

    · added support for substitution in Graphviz graph specifications
    · added support for Graphviz diagrams in the shiny app

  • Version 0.5

    · added support for subgraphs and Gantt charts in mermaid diagrams
    · added function graphviz_nodes_edges_df for generating Graphviz DOT code that defines nodes and edges (and their attributes) from data in two data frames: one for nodes, the other for the edge operations
    · added function graphviz_single_df for generating Graphviz DOT code from a single data frame
    · incorporated the new substitution operators @_{...} or @^{...} in grViz statements for subscripting and superscripting, respectively

  • Version 0.6

    · added several functions to work with graphs: create_nodes, create_edges, combine_nodes, combine_edges, scale_nodes, scale_edges, get_nodes, node_info, graphviz_graph, graphviz_render, and graphviz_export
    · removed the graphviz_nodes_edges_df and graphviz_single_df functions

  • Version 0.7

    · renamed functions graphviz_graph and graphviz_render to create_graph and render_graph, respectively
    · removed function graphviz_export (exporting now handled with render_graph)
    · added several new functions to inspect, analyze, and modify graphs: display_graph_object, node_info, edge_info, node_present, edge_present, get_nodes, get_edges, get_predecessors, get_successors, node_count, edge_count, is_graph_empty, is_graph_directed, add_node, add_edges, delete_node, delete_edge, node_type, edge_relationship, create_series, add_to_series, remove_from_series, graph_count, subset_series, trigger_script, render_graph_from_series, series_info

  • Version 0.8

    · revised many graph functions so they work better together
    · added many testthat tests to maintain the quality of the graph functions
    · added functions create_random_graph, import_graph, combine_graphs, country_graph and select_graph_from_series
    · support for visNetwork graphs as a rendering option with render_graph