Most likely you'll be using R.Execute function to do your data wrangling.
Type the following command in your query to get more details about this
= #shared[R.Execute]
For an instruction on how to call R from the UI you can follow the article from
https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-in-query-editor/
Another good resource
https://blog.gbrueckl.at/2016/05/running-local-scripts-power-bi/