2. Agenda
• Why R in Power BI
• R integration in Power BI
• R Connector
• R & Power Query
• R Visuals
• Q&A
• Lab
3. What is R?
• Used by 2m+ data scientists, statisticians and analysts
• Flexible, extensible and comprehensive for productivity
• As seen in New York Times, The Economist and FlowingData
6. Power BI: R Integration Points
R Connector R & Power Query R Visuals
7. R Connector
• Install R - https://docs.microsoft.com/en-us/power-bi/desktop-r-visuals
• Configure R Home Directory
• Packages and dependencies must be explicitly loaded
• Only Data Frames
• No Complex Type, No user inputs
• 30 minutes timeout
• Setwd to full path
• https://docs.microsoft.com/en-us/power-bi/service-r-packages-
support
8. Data
• Web Data Scrub - rvest, httr, rcurl, and others
• Complicated Data Transformation: dplyr, tidyr, lubrdiate, stringr…
• XML or JSON data: XML, jsonlite, and others
• RegEx to Scrub the data
• mice package to impute missing values
• tidytext package to assign sentiment scores to text inputs
• Export Data
12. Limitations
• Data size limitations: 150,000 rows
• Calculation time limitation 5 minutes.
• Relationships.
• R visuals responses for cross-filtering but it cannot filter.
• R visuals respond to highlighting other visuals, but you cannot click on
elements in the R visual in order to cross filter other elements.