-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
53 lines (39 loc) · 2.67 KB
/
README.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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# updater
<!-- badges: start -->
[![R-CMD-check](https://github.com/ddsjoberg/updater/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ddsjoberg/updater/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/updater)](https://CRAN.R-project.org/package=updater)
[![Codecov test coverage](https://codecov.io/gh/ddsjoberg/updater/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ddsjoberg/updater?branch=main)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->
The goal of updater is to ease the R update process.
The package will _re-install_ packages available on your previous version of R into the system library of your new installation.
The package uses {renv} to install the packages, adding each installation into your {renv} cache.
Importantly, the package _re-installs_ the packages and does _not_ copy them from the previous R installation library.
R packages for minor R releases (e.g. R 4.1 to R 4.2) may _not_ be compatible, which is why it's important to re-install the packages and not copy them.
## Usage
1. Record location of current R system library
- Open your current version of R (before you update), and type `.libPaths()` into the console.
The current R system library locations will print to the console: save these file locations, e.g. copy and past the locations into Notepad or TextEdit.
- It may be possible to skip this step and find the library location by calling `find_previous_library_location()` from your updated R session,
but it's recommended to use `.libPaths()` now to ensure accuracy.
It's likely that this function only works on **Windows** machines.
If you are a Mac or Linux user and would like to contribute to your OS's functionality, please file an issue on GitHub.
2. Install R
- Download and install the new version of R from https://cran.r-project.org/.
3. Install packages
- Open your new version of R and install the {updater} package with `install.packages("updater")`.
- Run `updater::install_pkgs(lib.loc = c("<location(s) saved in Step 1>"))`.
*As mentioned above, if you didn't record the location, you may try to locate it with `find_previous_library_location()`.*
<img src = "https://github.com/ddsjoberg/updater/blob/main/man/figures/install_screenshot.png?raw=true">