Skip to content

KevinLu0000/riii

 
 

Repository files navigation

R 語言基礎

DB105

CLASS 1

Download R

Download RStudio

install R 3.5 on ubuntu16.04

step 1: add key

in terminal

gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -

step 2: add source

sudo vi /etc/apt/sources.list

貼上以下文字

deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/
deb http://debian.linux.org.tw/ubuntu/ bionic-backports main restricted universe

step 3: use apt-get install r

sudo apt-get update
sudo apt-get install r-base r-base-dev

write R code in jupyter notebook

step 1: open R in terminal, install all packages using the following lines

# in R console
> install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
> devtools::install_github('IRkernel/IRkernel')

if installing devtools failed:

sudo apt-get install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev

step2: install R kernel

#in R console
> IRkernel::installspec()

step3: start jupyter notebook, select R kernel

#in terminal
jupyter notebook

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%