Skip to content
Keeping an exotic pet in your home! Taming Python to live in RStudio because sometimes the best language is both!
Branch: master
Clone or download
Latest commit bc1662f Jul 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
libs ML example data and prototype analysis Jun 30, 2019
music_ml remove stray lda header Jul 9, 2019
pics mac error added to md; corrections Jul 7, 2019
.gitignore initial Jun 28, 2019
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jul 12, 2019
LICENSE
README.html remove instructions not relevant after the tutorial Jul 9, 2019
README.md Update README.md Jul 12, 2019
index.Rmd correct attribute/method conflation Jul 9, 2019
index.html add pdf of slides Jul 12, 2019
index.pdf add pdf of slides Jul 12, 2019
tester.Rmd tester rmd added and README updated accordingly Jul 4, 2019
tester.html remove stray lda header Jul 9, 2019
useR2019_tutorial.Rproj initial Jun 28, 2019

README.md

DOI

useR2019_tutorial

Keeping an exotic pet in your home! Taming Python to live in RStudio because sometimes the best language is both!

Pre-tutorial instructions

Software and packages

Participants need a laptop with RStudio 1.2 and Anaconda 3 installed.

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:

install.packages("devtools")

You should be then able to install reticulate with:

devtools::install_github("rstudio/reticulate")

You can read more about devtools here: https://www.r-project.org/nosvn/pandoc/devtools.html

We will also use readxl and ggplot2. Please also install them from CRAN.

Tutorial materials

Download this repository. You can do this with the green Clone or download button above and selecting Download ZIP.

Extract the files.

Information

Please make a note of where your RStudio and Anaconda3 plugins are located. For example, on my windows machine they are:

C:\Program Files\RStudio\bin\plugins
C:\ProgramData\Anaconda3\Library\plugins

Tester

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.

 QT_PLUGIN_PATH environment variable in Advanced System settings

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:

touch $HOME/.Renviron

open $HOME/.Renviron

Include inside the file:

RETICULATE_PYTHON=/anaconda3/bin/python3

Close.

Restart RStudio and you hopefully find the tester can now be knitted.

During the tutorial

View the Slides

View the Classification of Audio segments by instrument example


Creative Commons License
user2019 Tutorial: Taming Python to live in RStudio by Emma Rand is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

You can’t perform that action at this time.