Decision Trees
Hello Sharon,
Thank you for sharing this example. I have a question, I just tried the following short code for plotting a decision tree in Power BI:
-----------------------------
library(rpart.plot)
library(rpart)
set.seed(1)
fit <- rpart(Kyphosis~Age+Number+Start,method="class",data=kyphosis)
rpart.plot(fit)
-----------------------------
That worked very well and the plot appeared to be OK in PBI Desktop, but once I published the file on Power BI service the plot changed a lot (attached file).
Then I tried with your template and the plot is perfect on desktop and on PBI service. I noted some differences in the code like the function replaceFancyRpartPlot(). But I don't know exactly why the visual changed so much between desktop and the version published on the web.
Can you give me a hand with this?
Thanks in advance.
J.
- boefraty8 years agoMicrosoft Employee
Hi realexander,
The differences in performance for PBI desktop and service are due to different R engine (and packages) vesrions.
Unfortunatly, we still have R3.2.2 in service, it is about to be upgraded next month.