Executin R script in PowerBI but getting error (error is too long to put in the title)

Making a plot in PowerBI but getting this error

Error Message:
R script error.
Error: package or namespace load failed for 'dplyr' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace 'rlang' 0.2.2 is being loaded, but >= 0.3.0 is required

Packages I am using are


Other packages like ggplot2 can be loaded easily in R
but, the plot is functioning properly in RStudio. Also, rlang package version 0.3.1 is installed and I have updated all the packages. Using R v3.5.2.
I have removed and reinstalled rlang, dplyr,etc

Is PowerBI running on your local machine?

Yes, I am using it on the local machine and R is configured with it. The address of R library is correctly linked with PowerBI. Also, I tested some basic plots for R in PowerBi and it worked correctly.

Does PowerBI have its own installation of R somewhere on your machine (that may be separate from the version of R that RStudio is using)?

As far as I remember, it doesn't have its own installation, it uses whatever is configured already.

1 Like

It's been a while since I used Power BI, my memory is hazy here, but here are a few ideas.

Do you perhaps have more than one install of R on your machine? Which one does Power BI point to?
Feels like 'rlang' 0.2.2 is sitting somewhere on your machine, and Power BI is pointing there...

Also, keep in mind that Power BI doesn't support every package. And indeed, fit.models isn't on the list:

Thank You for providing me the crucial information. Guess, need to find another method to do the same This is my first plot in Powerbi with R. Just for curiosity is there any substitute to fit.models package that function like it.

Actually, in that package the coefficients of hypothesis are calculated automatically. Like if h(x) = Ax^2 +Bx+C. (A, B, C) are calculated by the fitModel(). I do not need to provide the coefficients. All I do is provide hypothesis and the values are calculated with less coding.

I am new to Machine Learning hence, cannot do detailed coding yet in R.

Thank You for your support.:hugs:

1 Like

A thread related to finding alternatives to fit.models has started here: Any package substitute to "fit.models" package that can run in PowerBI.

1 Like