Showing posts with label ipython notebook. Show all posts
Showing posts with label ipython notebook. Show all posts

Thursday, March 13, 2014

Using Rpy2 with Anaconda and Ipython notebook

Typically in ipython notebook, the only command required to print a plot inline is the following:

=====================
%load_ext rmagic
=====================

=====================
%%R 
x<-c(1,2,3)
y<-c(2,3,4)
plot(x,y)
=====================

While working on AWS, my plots would not show up inline. I found out that this is because rpy2 only works for python 2.7.5. 

The easy fix is 

conda install python=2.7.5=2