The last versions of Power BI Desktop cannot load R scripts. I've tried with different R Scripts that run perfect in RStudio, for example this script:
x <- rnorm(100)
y <- rnorm(100)
df1 <- data.frame(x,y)
But in Power BI always appears the same two errors:
Details: "EvaluateNativeQueryUnpermitted failure: the query 'x <- rnorm(100) y <- rnorm(100) df1 <- data.frame(x,y)' isn't approved for execution."
Details: "An error happened while reading data from the provider: 'Object reference not set to an instance of an object.'"
What could be the cause of these errors? There is something wrong in the configuration of R in Power BI or there is a bug or error in the Power BI updates?
Thank you so much!