Power BI with R: How to Get Power BI ready for R script

Опубликовано: 23 Октябрь 2024
на канале: Mike YU (BI&Analytics)
199
3

To Enable R scripts Visual feature in Power BI Desktop , we need go to File / Options and settings / Options / R Scripting.

In the R scripts options you have two fields to fill. First one is to choose home directory for R, which means you need first to install a R engine and select the installed R engine location for the field. To install R engine we may click the link ”how to install R”. it brings us to the Microsoft learning site regarding where to download R engine and how to install it.

The second field is to choose which R IDE(Integrated Development Environment) ,for example the R Studio, which is the R IDE you want Power BI desktop to launch, of course you also need to install R Studio, to know what benefit we need R studio and how to install R studio, click the link “know more about IDEs”. It will bring us to the site to know the benefits by using R IDEs, where to find and how to install R Studio. I personally like very much the Feature “ Edit script in external IDE “. As it can have our power BI desktop data automatically imported and displayed in the R IDE. From there, we can modify the script in external R IDE, then paste it back into Power BI Desktop to create Power BI visuals and reports.

Once above installation and setting done, we can start to work on R scripts creation for drawing the advanced visual plot and make data transform as well in power BI desktop. we can work on the scripts directly in Power BI R script editor or we use the external R studio as IDE to create R scripts, then copy and paste the scripts into power BI R scripts editor.