-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinstall_R.Rmd
69 lines (43 loc) · 1.17 KB
/
install_R.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
title: "R Installation Guide"
author: "Mansun Kuo"
date: "`r Sys.Date()`"
output:
html_document:
toc: yes
---
## R
### Windows
Download and install R base and Rtools.
- https://cran.rstudio.com/bin/windows/base/
- https://cran.rstudio.com/bin/windows/Rtools/
### Mac
Download R-x.x.x.pkg and install it.
- https://cran.r-project.org/bin/macosx/
You may need to install libxml2 with [Homebrew](http://brew.sh/):
```bash
brew install libxml2
```
### Linux
- [Ubuntu](https://cran.r-project.org/bin/linux/ubuntu/README.html)
- [Red Hat](https://cran.r-project.org/bin/linux/redhat/README)
You may need install some system libraries for our R packages.
Here we only take Ubuntu as example.
Curl:
```bash
sudo apt-get install curl libcurl4-openssl-dev
```
XML:
```bash
sudo apt-get install libxml2-dev
```
## RStudio
Download and install RStudio desktop.
- https://www.rstudio.com/products/rstudio/download/
## Packages
Open R console and execute following code:
```r
pkgs = c("httr", "rvest", "DT", "rmarkdown", "XML", "whisker", "googleVis", "leaflet",
"jsonlite", "magrittr", "data.table", "RSQLite", "knitr", "stringr")
install.packages(pkgs)
```