Forum Discussion
R Visuals not rendering in PBI Services
- Anonymous6 years ago
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-securityThe 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 <- datasetfstat <- 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} - Anonymous6 years agoHi All
The issues is a microsoft product problem. I have conformation Microsoft product team.
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
The issues is a microsoft product problem. I have conformation Microsoft product team.