Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor amendments to rstudio upgrade help #495

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions source/documentation/tools/rstudio/package-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ renv::use_python()
If you encounter difficulties upgrading older RStudio projects that use R4.1.x and R4.2.x to the latest releases of RStudio that use R4.4.0 and above, try following these steps (helpfully provided by an AP user):


1. Ensure that you have the latest CRAN set in your RStudio environment. Depending on the source you want to use for package management, run either:
1. You may need to reinstall `renv`. You can install it in the R console with:

```r
install_packages("renv")
```

You can find more guidance about working with renv [above](#renv).

2. Ensure that you have the latest CRAN set in your RStudio environment. Depending on the source you want to use for package management, in the R console run either:

```r
options(repos = c(CRAN = "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"))
Expand All @@ -161,13 +169,13 @@ If you encounter difficulties upgrading older RStudio projects that use R4.1.x a
options(repos = c(CRAN ="https://p3m.dev/cran/linux/jammy/latest"))
```

2. Attempt to restore your project:
3. In the R console try to restore your project:

```r
renv::restore()
```

3. If running `renv::restore()` throws errors:
4. If running `renv::restore()` throws errors:
- Identify the package causing error and find the latest version of that on CRAN
- Run `renv::install("thatpackage@latest_version")`
- Run `renv::record("that_package")` - this will update the version in your renv.lock file
Expand Down