0

the script below creates a process map diagram using standard built in patients data. I wish to customize the plot furthur using ggplot2 and plotly such that I can create a dynamic process diagram which is interactive. I am not getting, how to put ggplot2 in the commands below. Thank you and please help.

library(shiny)
library(shinydashboard)
library(bupaR)
library(edeaR)
library(eventdataR)
library(processmapR)
library(processmonitR)
library(xesreadR)
library(ggplot2)
library(DiagrammeR)
library(plotly)

patients %>% process_map()
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
  • I don't think so you can use plotly or ggplot here because the output is `grviz` object, drwan using `viz.js` – Hardik Gupta Oct 09 '17 at 08:54
  • `> class(process_map(patients)) [1] "grViz" "htmlwidget"` – Hardik Gupta Oct 09 '17 at 08:54
  • Thank you so much for replying Hardik, I too am struggling with this issue, I need to make the plot dynamic like how ggplotly is. Do you know any other ways as to how we can create the process map in the link that I'll attach. – Ashmin Kaul Oct 09 '17 at 08:56
  • https://stackoverflow.com/questions/46602433/creating-process-map-diagrams-using-different-packages-in-r – Ashmin Kaul Oct 09 '17 at 08:57
  • have you looked at this question - https://stackoverflow.com/questions/46480114/shiny-mainpanel-output-blank-rstudio-viewer-updates-instead/46482163#46482163 – Hardik Gupta Oct 09 '17 at 09:00
  • Also check here - https://www.r-bloggers.com/bupar-business-process-analysis-with-r/ – Hardik Gupta Oct 09 '17 at 09:05
  • Thanks but I have implemented that functionality in R shiny, see, the diagram has been created using diagrammeR, and needs to be made dynamic. Second link also done Sir. As you make the ggplot2 plot dynamic using ggplotly, I too wish to make the DiagrammeR plot dynamic. – Ashmin Kaul Oct 09 '17 at 09:05
  • you might have noticed one thing: your plots open in `viewer` not in plot. I doubt this will get converted to `plot` in rstudio, because it is using some javascript to create the plot – Hardik Gupta Oct 09 '17 at 09:12
  • This plot comes in R shiny using renderDiagrammeR and grvizOutput, I have have done this also. I have to make the plot dynamic as in I should click on the arcs and perform onclick operations. – Ashmin Kaul Oct 09 '17 at 09:17
  • check this - https://github.com/rich-iannone/DiagrammeR/issues/126 – Hardik Gupta Oct 09 '17 at 09:18
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/156255/discussion-between-ashmin-kaul-and-hardik-gupta). – Ashmin Kaul Oct 09 '17 at 09:41

0 Answers0