Running an R Visualization in Power BI Desktop

In the previous posts, we installed R for Windows and RStudio as an IDE for R. Both are configured to work with Power BI. In this post, we will run an R Visualization in Power BI. In Power BI Desktop, you will see the R visualization type under Visualizations: Selecting it, we see the message to Enable script visuals. Note the warning and click Enable if you want to proceed: … Continue reading Running an R Visualization in Power BI Desktop

Installing and Removing Packages in R

To install an R package, open your R UI such as RStudio. You will see Packages: Let’s install the DT library, which does not exist on this environment. We can do this through the GUI or through the command. We will do both, first the GUI. Click on Install: Enter DT into the Packages field and click Install: We can see this runs in the console the command: install.packages(“DT”) It … Continue reading Installing and Removing Packages in R

Install R Packages for Power BI R Visualizations

In Power BI, when using the R custom visualization, we may need to use an R package that is not installed. Note the list of supported packages. For example, we’re trying to use the DT library: But we get Error in Library(DT) there is no package called DT: We can use the command install.packages to try to resolve this: However, this produces this error: R script error. Installing package into … Continue reading Install R Packages for Power BI R Visualizations

Running an R Visualization from the Marketplace in Power BI

In the previous posts, we installed R for Windows and RStudio as an IDE for R. Both are configured to work with Power BI. In this post, we will run an R Visualization from the Power BI marketplace. In Power BI Desktop, under Visualizations select Import from Marketplace: Note you can see these visualizations from AppSource at https://appsource.microsoft.com/en-US/marketplace/apps?page=1&product=power-bi-visuals: Let’s install the Outlier Detection visualization from Microsoft. In Power BI Desktop, … Continue reading Running an R Visualization from the Marketplace in Power BI

Installing R Studio for Power BI

In our last post, we installed R for Power BI. Let’s now install RStudio, which is an IDE for R. First, download R Studio from https://www.rstudio.com/products/rstudio/download/. We will install the free version: Select the Windows installer: This downloads the file below. Open it: Click Next: Select a path and click Next: Click Install: Click Finish: In Windows Start menu, we see the new RStudio folder with RStudio: Select it to open … Continue reading Installing R Studio for Power BI

Installing R for Power BI using CRAN Repository

To install R for Power BI on Windows, go through the following steps. First, we will download R for Windows. Go to the CRAN Repository and select Download for Windows: This will download the file below. Click to open it: Click OK: Click Next: Confirm the location and click Next: Select the files you need installed and click next. I will install on a 64-bit machine: Select customized startup or … Continue reading Installing R for Power BI using CRAN Repository

Using Sample Datasets Installed in R

R has built-in datasets which can be useful for learning R. Let’s take a look at these. From RGui, let’s see the packages installed by going to Load package: We can see datsets and MASS are installed: From RStudio we can see the same thing: We can use datasets right away as the library is loaded. In RGui or RStudio, type in: data() This will display the datasets installed in the … Continue reading Using Sample Datasets Installed in R