Keeping an exotic pet in your home! Taming Python to live in RStudio because sometimes the best language is both!
Software and packages
Please also install the
reticulate package and I recommend the development version from github. Installing packages from github requires first installing the
devtools package from CRAN:
You should be then able to install
You can read more about
devtools here: https://www.r-project.org/nosvn/pandoc/devtools.html
We will also use
ggplot2. Please also install them from CRAN.
Download this repository. You can do this with the green
Clone or download button above and selecting Download ZIP.
Extract the files.
Please make a note of where your RStudio and Anaconda3 plugins are located. For example, on my windows machine they are:
This file should help you discover if you are set up for the tutorial.
Start RStudio, open tester.Rmd and hit the knit button.
If all goes well, you should get this output: tester.html
qt platform plugin Error?
Did you get this error:
*This application has failed to start because it could not find or load the qt platform plugin "windows" in "" *
Some people seem to get this error but not everyone. I've seen it on some windows machines.
You need to set your QT_PLUGIN_PATH environment variable to where the RStudio and Anaconda3 plugins are located
In windows: Control Panel -> System and Security -> System then
Advanced System settings -> Environment variables
I have set mine to:
C:\Program Files\RStudio\bin\plugins; C:\ProgramData\Anaconda3\Library\plugins
You may need to add a new variable. The order of the paths matters - make sure you have the
C:\Program Files\RStudio\bin\plugins first.
If you can describe, resolve or circumvent this in a better but still minimal way, please get in touch!
Mac user with a Error?
A couple of mac users reported an error "No module named pandas"
This solution, given by William Farin, might help. Thank you William!!
Create as Renviron. File in a terminal:
Include inside the file:
Restart RStudio and you hopefully find the tester can now be knitted.
During the tutorial
View the Slides
user2019 Tutorial: Taming Python to live in RStudio by Emma Rand is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.