This is a tutorial on installing Jupyter.

Rowen’s Blog [http://wenup.wordpress.com]

R on Ipython / Jupyter Notebook using Miniconda

Installation – download from http://conda.pydata.org/miniconda.html

Installing R using Conda

Use command prompt if in windows or terminal in linux or MacOS.

Create a new Environment called R Install packages named R and R-Essentials * conda -n r -c r r-essentials

This command creates an environment named r with installation of r and r-essentials (common packages)

Open your Command Prompt

C:>

Activate your environment

C:>activate r

Running R on Jupyter Notebook

C:>jupyter notebook

Open your Browser

http://localhost:8888 Usually it is port 8888, but you can see the port number on the command prompt

Do the R thing on Jupyter

This automatically saves your work, and you can export your work in a number of formats.

print("Hello R")
## [1] "Hello R"
citation()
## 
## To cite R in publications use:
## 
##   R Core Team (2015). R: A language and environment for
##   statistical computing. R Foundation for Statistical Computing,
##   Vienna, Austria. URL https://www.R-project.org/.
## 
## A BibTeX entry for LaTeX users is
## 
##   @Manual{,
##     title = {R: A Language and Environment for Statistical Computing},
##     author = {{R Core Team}},
##     organization = {R Foundation for Statistical Computing},
##     address = {Vienna, Austria},
##     year = {2015},
##     url = {https://www.R-project.org/},
##   }
## 
## We have invested a lot of time and effort in creating R, please
## cite it when using it for data analysis. See also
## 'citation("pkgname")' for citing R packages.
R.Version()
## $platform
## [1] "x86_64-w64-mingw32"
## 
## $arch
## [1] "x86_64"
## 
## $os
## [1] "mingw32"
## 
## $system
## [1] "x86_64, mingw32"
## 
## $status
## [1] ""
## 
## $major
## [1] "3"
## 
## $minor
## [1] "2.3"
## 
## $year
## [1] "2015"
## 
## $month
## [1] "12"
## 
## $day
## [1] "10"
## 
## $`svn rev`
## [1] "69752"
## 
## $language
## [1] "R"
## 
## $version.string
## [1] "R version 3.2.3 (2015-12-10)"
## 
## $nickname
## [1] "Wooden Christmas-Tree"
x <- rnorm(1000)
plot(x)

Installing additional packages

Goto your prompt or terminal

R

From R Console

You need to specify the repo source.

Deactivating your Environment

  • deactivate