Skip to content
Erik Rodriguez edited this page Sep 3, 2024 · 9 revisions

Tips for Running the Site

renv

From inside the console of RStudio

 renv::restore()
- The library is already synchronized with the lockfile.
> 

If packages need updating, you will see something like this:

> renv::restore()
The following package(s) will be updated:

# CRAN -----------------------------------------------------------------------
- lattice   [0.22-6 -> 0.22-5]
- MASS      [7.3-60.2 -> 7.3-60.0.1]
- Matrix    [1.7-0 -> 1.6-5]

Do you want to proceed? [Y/n]: 

If the build fails, you may need to install libraries on your computer.

Mac

you may need some of the tools here:

https://mac.r-project.org/tools/

To install tidyverse, I needed to install the gfortran package on the site above. I also installed Xcode command line tools. I'm not sure of the exact requirements as I installed both and then the build for Matrix worked.

Windows

Follow this YouTube tutorial https://www.youtube.com/watch?v=VEvw43iF6rY for installing R, RTools, & RStudio

R: https://cran.r-project.org/bin/windows/base/

RTools: https://cran.r-project.org/bin/windows/Rtools/

RStudio: https://posit.co/download/rstudio-desktop/

Option 1: Default install diectories

As of September 4, 2024, the default install directories appear to work on Windows 11.

Option 2: Install in a Single R Directory

  • Create an R directory and change location of all installs to that folder, follow how the youtube tutorial renamed the paths
  • Uncheck read only property of R folder, "future installations of packages happen in this folder only"

Installing all project libraries with lockfile in R studio

Open your project

image

image

Click renv and then Restore Library...

image