forked from jennybc/happy-git-with-r
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-r-rstudio.Rmd
49 lines (39 loc) · 2.97 KB
/
install-r-rstudio.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
# Install or upgrade R and RStudio {#install-r-rstudio}
```{r, include = FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE
)
```
1. Install a pre-compiled binary of R for your OS from here:
<https://cloud.r-project.org>
Already have R installed? **Hold on: This is a great time to make sure your R installation is current.** Check your current version like so:
```{r}
R.version.string
```
1. Install RStudio Desktop.
Already have RStudio? **Hold on: This is a great time to upgrade to the latest Preview version.** Download it here:
<https://www.rstudio.com/products/rstudio/download/preview/>
1. Update your R packages:
```{r, eval = FALSE}
update.packages(ask = FALSE, checkBuilt = TRUE)
```
## How to think about upgrading R and RStudio
**Get current, people.** You don't want to adopt new things on day one. But at some point, running old versions of software adds unnecessary difficulty.
In live workshops, there is a limit to how much we can help with ancient versions of R or RStudio. Also, frankly, there is a limit to our motivation. By definition, these problems are going away and we'd rather focus on edge cases with current versions, which affect lots of people.
Is your R version "old"? R had a *major* version change in April 2020, with the release of 4.0.0. It is a good idea to be on the current major version, meaning 4.something at this point, especially if you want to get the most out of a workshop.
Each major version is followed by several years of smaller releases (minor and patch releases). You can be more relaxed about upgrading minor versions, but you still want to stay reasonably current. As the 4.something series unfolds, I advise that you **never fall more than 1 minor version behind**.
Concrete example: let's say the released version of R is 4.7.1, which is totally fictional and well beyond the current version of R at the time of writing.
It's probably OK if you are still on 4.6.whatever, which is one minor version behind and is called "r-oldrel".
Being one minor version behind usually doesn't cause trouble.
Once you are 2 minor versions behind (4.5.whatever or earlier in this example), you will start to suffer.
In particular, you can no longer install pre-built binary add-on packages from CRAN.
Is your RStudio "old"?
Unless you have a specific reason to prefer the released version, try the Preview.
The Preview version is often the same as the general release.
But in the build-up to a new general release, the Preview release is used for release candidates.
The Preview version includes new (upcoming) features, but it is also generally very stable and highly usable.
You can expect to update RStudio much more often than R itself.
For example, I update RStudio every month or so, whereas I update R 1 or 2 times per year.
* Main RStudio IDE download page: <https://www.rstudio.com/products/rstudio/download/#download>
* RStudio IDE Preview download page: <https://www.rstudio.com/products/rstudio/download/preview/>