dhimmel / thinklytics

Continuous Thinklab project exports and analytics
https://think-lab.github.io/
0 stars 2 forks source link

Specify R visualization environment #2

Open dhimmel opened 7 years ago

dhimmel commented 7 years ago

The viz directory uses R inside of a jupyter notebook to create the Rephetio contribution viz. Right now sessionInfo() is run, but an actual environment hasn't been created. This issue is to create an environment.

dhimmel commented 7 years ago

I created the following conda environment.yml:

name: r-thinklytics
channels:
- r
dependencies:
- r=3.3.1
- r-magrittr=1.5
- r-readr=1.0.0
- r-dplyr=0.5.0
- r-tidyr=0.5.1
- r-lubridate=1.5
- r-rcolorbrewer=1.1.2
- r-ggplot2=2.1.0
- r-irkernel=0.7.0

Which can be (un)installed with:

# install
conda env create --file environment.yml

# remove
conda env remove --name r-thinklytics

Once activated, open an R session and run the following to add the kernel to your jupyter notebooks.

IRkernel::installspec(name = 'r-thinklytics', displayname = 'R thinklytics')

Unfortunately, this didn't seem to work -- the installed version of ggplot2 was 2.2.0 not 2.1.0. Ahh!