cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Rendering a plot created by R in "dgr_graph" format

Hi,

 

I have created a plot in R, using the bupaR package, which renders beautifully in RStudio, but not in PowerBI. When trying it in PowerBI, it acts as if the plot has not been created.

 

Anyone can let me know how I can debug this issue?

 

Bests

BZ

2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: Rendering a plot created by R in "dgr_graph" format

Hey,

 

I'm wondering if you are aware of this site:

https://docs.microsoft.com/en-us/power-bi/desktop-r-visuals

 

Please check the link above, if you need more help, please describe what you have done in Power BI Desktop, and what is not working.

 

Make sure that you install the library that you are using in the r-script using 

library("nameofthepackage")

You also have to be aware, that not all R packages that you can use with Power BI Desktop are not supported in Power BI Service, here you will find a list of the R packages that are supported by the Power BI Service.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Highlighted
New Member

Re: Rendering a plot created by R in "dgr_graph" format

Thanks @TomMartensfor your reply.

 

Here is the sample code: 

 

library(DiagrammeR)
create_graph() %>%
  add_balanced_tree(
    k = 2, h = 3) %>%
  render_graph()
 
This works well in RStudio, but generates an error in PBI.
 
Same is true if we do it the more simple way:
 
x <- create_graph()
y <- add_balanced_tree(x, k = 2, h = 3)
render_graph(y)
 
And the class of x and y here is "dgr_graph". So my conclusion here is that PowerBI does not let the render_graph does its job correctly on this type of variables. But I may miss something here.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors