Search code examples
rdiagrammer

R function for generating DOT output of process_map


I have this R code:

dataset %>%
   process_map()

Is there way to get the DOT notational of this output and save it as a gv file? Just for comparison, in python, Digraph.save generates a DOT file of the graph.


Solution

  • With the help of John Colman's response, I think the answer is

    pg <- process_map(dataset, render = FALSE)
    DiagrammeR::generate_dot(pg) %>% cat(file = "~/dot.gv")
    

    And looks like it's working as expected so far...