Ubuntu-16.04 R Installation and Jupyter notebook configuration

Source: Internet
Author: User
Tags jupyter jupyter notebook

1. R Installation

Usually under terminal directly apt-get can, in 16.10 get to R-3.3.1, at present the latest seems to be R-3.4.2, can go to the official website to download source code compilation (https://www.r-project.org)?

sudo Install R-base

2. Configuring R's kernel in Jupyter notebook

Recently ran Python under Jupyter, easy to debug while taking notes. Because Jupyter also supports the R language, try adding r kernel to Jupyter. Mainly relies on the "Irkernel" package. (Some packages may need FQ to download, the specific method please DIY.) The configuration method is as follows:

(1) Install the necessary Lib

sudo Install libzmq3-dev libssl-dev libcurl? 4-openssl-devsudo R # into the R environment?

>? Install.packages (C (' repr ', ' irdisplay ', ' Evaluate ', ' crayon ', ' pbdzmq ', ' devtools ', ' uuid ', ' Digest '))

Note: you will be prompted to select mirrors, we recommend selecting 0-cloud

> Devtools::install_github ('irkernel/irkernel');? Irkernel::installspec ()

If displayed, the following results indicate that the configuration was successful.

[Installkernelspec] Installed Kernelspec ir in/home/xxx/.local/share/jupyter/kernels/ir?

Note: Be sure to set the mirror when loading the R package on Jupyter, otherwise it will fail:

# Use the following command to set the image, such as I choose the mirror USTCoptions (repos = ' http://mirrors.ustc.edu.cn/CRAN/')# Check if the image changes GetOption ( ' Repos ')

Ubuntu-16.04 R Installation and Jupyter notebook configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.