Installing Anaconda – it is a free Python distribution (including commercial use and redistribution!). You can download it here then install as below.
$ bash Anaconda2-4.1.1-MacOSX-x86_64.sh
Installing Jupyter Notebook – since now anaconda is installed, we can use conda to install Jupyter Notebook
$ conda install jupyter
major advantage we get with conda is that it takes care of all dependencies, making the whole process simple.
Installing R kernel and components
$ conda install -c r r-essentials
If everything went fine