I know this may look daunting, but honestly with just a little bit of prep work it’s truly not difficult.
For basic package install instructions and execution of R scripts within Power BI, check out this post I made a few days ago (ignore the t-test information):
In terms of versions and IDE, I would definitely say for now go with the standard CRAN version and R Studio. That is the configuration that the vast percentage of users employ, and unless you are running huge datasets should be fine for your purposes.
In terms of ggpplot2, here are a couple of videos I really like. Roger Peng’s is not interactive, but he does a really good job explaining the theory behind how R visuals are structured via ggplot2. The second video is highly interactive, showing exactly how to build the different layers of a ggplot2 visual using the famous Titanic dataset.
The beauty of this is that once you understand the general structure, every visual you build in R is done exactly the same way – it’s just a matter of filling in the blanks for the specific look you want to achieve.
For your boxplot/jitterplot visual, the hbrthemes package is not at all critical – it does spell check and some typology stuff, but you can totally produce that visualization without it.
One of the great thing about going from Power BI to R is that you don’t need to learn hardly any of the data prep functionality within R. You can do it almost all within Power Query, and then just call the current query via the dataset variable (see the Benford post I did last week for an example, and I can help you with this when you get to this point if you need assistance).
I hope this is helpful. I know it looks daunting, but trust me once you get into it much of the mystery will evaporate and you’ll see that it is really fairly simple – in my opinion, much easier than learning Power BI. And once you do learn it, it expands your Power BI toolkit dramatically, both in terms of analyses you can do and the almost infinite catalog of visualizations available to you.
I’m currently working on putting all of this into an Enterprise DNA Portal course on basic R specifically for Power BI users, as part of the amazing slate of content we’ll be rolling out each month of 2021 (more on this to follow soon…)
Give this a go, and you know where to find us if you run into problems.
– Brian
P.S. Two side effects of learning ggplot2:
- once you understand the basic structure of gglplot2, it also really helps you understand how to use almost package within R, since they typicall all follow the same general structure of Function(Object, Options…)
- once you get used to using R Studio, you likely will get super mad about how bad the DAX and M development environments in Power BI are, at least until TE3 comes out…