-
Notifications
You must be signed in to change notification settings - Fork 17
/
p0c3-setup.qmd
144 lines (105 loc) · 5.56 KB
/
p0c3-setup.qmd
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Setup
This chapter will walk you through downloading the R programming language as well as R Studio, which is a popular tool for interacting with the R ecosystem. Additionally, there are alternatives to R Studio listed at the end of the chapter. However, R Studio is the recommended environment for completing this book.
## Install R
Before you do anything, you'll need to download R. This download will allow your computer to interpret the R code you write later on.
1. Download R From R: [The R Project for Statistical Computing](https://www.r-project.org/)
2. Select "download R"
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-r-1
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-r-1.png", dpi = 270)
```
3. Choose any link but preferably the one closest to your physical location
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-r-2
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-r-2.png", dpi = 270)
```
4. Choose your operating system
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-r-3
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-r-3.png", dpi = 270)
```
5. Press "Install R for the first time"
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-r-4
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-r-4.png", dpi = 270)
```
6. Press "download"
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-r-5
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-r-5.png", dpi = 270)
```
7. Open installer
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-r-6
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-r-6.png", dpi = 270)
```
8. Follow the prompts and leave all options set as their default values
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-r-7
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-r-7.png", dpi = 270)
```
## Install R Studio
After you install R, you'll need an environment to write and run your code in. Most people use a program called "RStudio" for this. To download RStudio follow the steps listed below:
1. Navigate to the R Studio download site: [Download the RStudio IDE](https://www.rstudio.com/products/rstudio/download/)
2. Press the "download" button under RStudio Desktop
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-rstudio-1
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-rstudio-1.png", dpi = 270)
```
3. Choose the download option for your operating system
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-rstudio-2
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-rstudio-2.png", dpi = 270)
```
4. Open the installer and accept all defaults
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: install-rstudio-3
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/install-rstudio-3.png", dpi = 270)
```
## Alternatives
### Posit Cloud
Posit Cloud offers users a way to replicate the full RStudio experience without having to download or set anything up on your personal computer. You can sign up for a free account here: [](https://posit.cloud/)
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: r-studio-cloud-1
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/r-studio-cloud-1.png", dpi = 270)
```
### Replit
Replit allows users to code in 50+ languages in the browser. While you won't be able to follow along with the RStudio specific examples, you will be able to run R code. You can sign up for a free account here: [](https://replit.com/)
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: replit-1
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/replit-1.png", dpi = 270)
```
### Kaggle
Kaggle is one of the most popular sites for data analysts to compete in data competitions, find data, and discuss data topics. They also have a feature that allows you to write and run R (and Python) code. You can sign up for a free account here: [](https://www.kaggle.com/)
```{r out.extra="style='background-color: #9ecff7; padding:10px; display: block; margin-left: auto; margin-right: auto; width: 80%;'"}
#| label: kaggle-1
#| echo: false
#| out.width: 500
knitr::include_graphics("images/setup/kaggle-1.png", dpi = 270)
```
## Resources
- "R Installation and Administration" by the R Core Team: <https://cran.r-project.org/doc/manuals/r-release/R-admin.html>