Power BI service supporting many R packages as of now and it will increase in future. There is a misunderstanding that we can use these packages in Power BI Desktop R visual.
We can’t use all the packages in the Power BI site because it includes the packages which can be used for R custom visuals development.
Check the list of packages that Power BI Service supports, here.
Let us take an example,
There is a package called “timevis” which is part of Power BI supported packages.
We can use this package to build a visual to display a time range information. I used this package in R studio and got the below visual.
You can use the below R script and try it by yourself. This package requires many dependent packages which you can identify while installing the R scripts. If any dependent packages are missing then you should install those missing packages and finally run the R script.
id = 1:4,
content = c(“Apple”, “Orange”, “Mango”, “Banana”),
start = c(“2017-01-10”, “2017-01-11”, “2017-01-20”, “2017-02-14 15:00:00”),
end = c(“2017-02-13”, NA, “2017-02-04”, NA)
It is easy to identify which packages are supported in Power BI from the list. Prepare your R script from any of the packages and make sure to check the supported package list and run the script in R studio.
If your package producing a visual and make sure that visual is displayed under plot section of R studio. If you see the visuals in plot section then those packages can be used in Power BI.
In our example, the visual is displayed under viewer section which means it is using HTML viewer which is not yet supported by R visual in Power BI.