cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

R Visuals not rendering in PBI Services

Hi Experts

 

I my R visuals are not displaying in pBI Services, these visual where fine until a few days ago (loading a working finre for a period of 9 months). I am not sure why they may have stopped displaying in PBI Services.

i have done the following steps.

1. Checked and Installed latest version of Cran R

2. Updated all the packages

3. have the most current version of desktop.

 

Not sure if i need to do anything on gateway???

 

The packages i am using in the R script in Desktop are

library(dplyr)
library(ggplot2)
library(survival)
library(survminer)
library(grid)
library(gridExtra)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: R Visuals not rendering in PBI Services

Team_eads

 

1. For security reasons, some of r script functions has been blocked on power bi service side(e.g. access external datasource, write/access to specific folder path, import/export file...). You could refer to this doucment:
https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals#r-scripts-security

The r script is not access anything from a fodler path nor import.

 

2. R script code with functions you don't defined clearly or too complex to calculate(over 60s) also not works on service side. 

 

All the above has been working fine for the last 9 months, this should not stop working over night.

here is my R Script

library(dplyr)
library(ggplot2)
library(survival)
library(survminer)
library(grid)
library(gridExtra)
pc <- dataset
fstat <- pc %>% mutate(fstatus = case_when(OUTCOMETYPE=="Revised" ~ 1,TRUE ~ 0))
pmpa <- fstat %>% select(PRIMARYPROCEDUREID,PRIMARYTOOUTCOMEYEARS,fstatus,OUTCOMETYPE)
if(nrow(pmpa) < 4){
d <- pmpa %>% select(PRIMARYPROCEDUREID,PRIMARYTOOUTCOMEYEARS,OUTCOMETYPE) %>% mutate(INSUFFICIENTDATA = "Summary Results")
h = head(d[,2:4])
grid.table(h)
}else{
fit <- survfit(Surv(PRIMARYTOOUTCOMEYEARS,fstatus)~1,data = pmpa)
ggsurv <- ggsurvplot(fit,
ylab="Patient Analysis",
xlab="Time (Years)",
break.time.by = 1,
xlim = c(0,max(fit$time)),
surv.scale = "percent",
legend.title = "Kaplan-Meier",
legend.labs = "",
risk.table = FALSE,
fontsize = 3,
font.tickslab = c(10, "plain"),
risk.table.y.text = FALSE,
fun = "event"
)
ggsurv$plot <- ggsurv$plot + theme(plot.title = element_text(hjust = 0.5, size=18), panel.grid.major = element_line(colour = "grey90"))
ggsurv$table <- ggsurv$table + theme(plot.title = element_text(hjust = 0.5, size = 10))
ggsurv
}

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: R Visuals not rendering in PBI Services

Hi All

The issues is a microsoft product problem. I have conformation Microsoft product team.

View solution in original post

7 REPLIES 7
Highlighted
Super User IV
Super User IV

Re: R Visuals not rendering in PBI Services

Hey,

 

here you will what R packages are supported on the service:

https://docs.microsoft.com/en-us/power-bi/service-r-packages-support

The current supported runtime is 3.4.4.

 

Maybe, updating your R environment has been responsible for the issue you are currently facing.

 

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
Anonymous
Not applicable

Re: R Visuals not rendering in PBI Services

hey tom

 

the issue was present even before i updated the R environment to 3.6.2 from 3.6.1. i have checked the Packages too and they are are supported for what i am trying to do. hence, why i am at a loss here.

Highlighted
Community Support
Community Support

Re: R Visuals not rendering in PBI Services

Hi @Anonymous ,

 

1. For security reasons, some of r script functions has been blocked on power bi service side(e.g. access external datasource, write/access to specific folder path, import/export file...). You could refer to this doucment:
https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals#r-scripts-security

2. R script code with functions you don't defined clearly or too complex to calculate(over 60s) also not works on service side. 

 

You can check through the above two points.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Highlighted
Anonymous
Not applicable

Re: R Visuals not rendering in PBI Services

Team_eads

 

1. For security reasons, some of r script functions has been blocked on power bi service side(e.g. access external datasource, write/access to specific folder path, import/export file...). You could refer to this doucment:
https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals#r-scripts-security

The r script is not access anything from a fodler path nor import.

 

2. R script code with functions you don't defined clearly or too complex to calculate(over 60s) also not works on service side. 

 

All the above has been working fine for the last 9 months, this should not stop working over night.

here is my R Script

library(dplyr)
library(ggplot2)
library(survival)
library(survminer)
library(grid)
library(gridExtra)
pc <- dataset
fstat <- pc %>% mutate(fstatus = case_when(OUTCOMETYPE=="Revised" ~ 1,TRUE ~ 0))
pmpa <- fstat %>% select(PRIMARYPROCEDUREID,PRIMARYTOOUTCOMEYEARS,fstatus,OUTCOMETYPE)
if(nrow(pmpa) < 4){
d <- pmpa %>% select(PRIMARYPROCEDUREID,PRIMARYTOOUTCOMEYEARS,OUTCOMETYPE) %>% mutate(INSUFFICIENTDATA = "Summary Results")
h = head(d[,2:4])
grid.table(h)
}else{
fit <- survfit(Surv(PRIMARYTOOUTCOMEYEARS,fstatus)~1,data = pmpa)
ggsurv <- ggsurvplot(fit,
ylab="Patient Analysis",
xlab="Time (Years)",
break.time.by = 1,
xlim = c(0,max(fit$time)),
surv.scale = "percent",
legend.title = "Kaplan-Meier",
legend.labs = "",
risk.table = FALSE,
fontsize = 3,
font.tickslab = c(10, "plain"),
risk.table.y.text = FALSE,
fun = "event"
)
ggsurv$plot <- ggsurv$plot + theme(plot.title = element_text(hjust = 0.5, size=18), panel.grid.major = element_line(colour = "grey90"))
ggsurv$table <- ggsurv$table + theme(plot.title = element_text(hjust = 0.5, size = 10))
ggsurv
}

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: R Visuals not rendering in PBI Services

Hi Microsoft Team

 

I have uploaded the file to the Power BI Pro envirnment and it work fine the previous PBIX file was also working fine in the Premium, hence by conclusion there must be a bug in the Premium Environment setting.

Regular Visitor

Re: R Visuals not rendering in PBI Services

We're noticing the same thing. Most of the (many) R visuals which render fine in the desktop files are not rendering in the service. 

Highlighted
Anonymous
Not applicable

Re: R Visuals not rendering in PBI Services

Hi All

The issues is a microsoft product problem. I have conformation Microsoft product team.

View solution in original post

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors