DiagrammeR not rendering in RStudio Viewer

When I run DiagrammeR::render_graph() in RStudio, the RStudio Viewer pane opens but nothing renders -- the Viewer pane remains blank. Below I have provided an example of the code I am running and my session info.

Does anyone know how to resolve this issue?

library(DiagrammeR)

a_graph <- create_graph() |> 
  add_node() |> 
  add_node() |> 
  add_edge(from = 1, to = 2)

render_graph(a_graph)

sessionInfo()

R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] DiagrammeR_1.0.11

loaded via a namespace (and not attached):
[1] vctrs_0.6.5 cli_3.6.2 rlang_1.1.4 stringi_1.8.4 purrr_1.0.2
[6] generics_0.1.3 jsonlite_1.8.8 glue_1.7.0 htmltools_0.5.8.1 rsconnect_1.3.1
[11] fansi_1.0.6 visNetwork_2.1.2 tibble_3.2.1 fastmap_1.2.0 yaml_2.3.8
[16] lifecycle_1.0.4 stringr_1.5.1 compiler_4.4.0 dplyr_1.1.4 RColorBrewer_1.1-3
[21] htmlwidgets_1.6.4 pkgconfig_2.0.3 rstudioapi_0.16.0 digest_0.6.35 R6_2.5.1
[26] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 tools_4.4.0
[31] withr_3.0.0

This could be a recent Windows issue: see last post in Plotly charts not displaying in RStudio Viewer on Windows

Thank you! Installing the patch fixed the problem for me.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.