Skip to content
/ useR2019_tutorial Public template

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

License

Notifications You must be signed in to change notification settings

3mmaRand/useR2019_tutorial

Repository files navigation

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.

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages