winget install Posit.rig
#winget install Posit.RStudio
# Restart cmd.exe
#rig install R
#rig system rtools add
rig system setup-user-lib
Tip
We recommend updating R, RStudio and Quarto twice a year, though this depends on how many and which advanced features are being pursued.
Noobs only
The following is for computer novices only. If you are well acquainted with R, Windows Explorer, synchronization of cloud files, etc you can skip this.
Your files should be synchronized to your local computer. You cannot work with R directly through files and folders only available in the cloud (e.g. Teams). See here for synchronizing from a Teams or Sharepoint project to you local computer.
Install R, Rstudio and optionally a newest pre-release of Quarto (the latter on own risk, the built-in version of Quarto attached to RStudio is usually sufficient). The easiest way to install these is to first make yourself administrator[^By installing in Program Files rather than AppData, you avoid potential problems if you have non-ASCII characters in your username], then open Windows start menu and type cmd.exe, click “Run as administrator” and press EnterEnter.
winget install Posit.rig
#winget install Posit.RStudio
# Restart cmd.exe
#rig install R
#rig system rtools add
rig system setup-user-lib
Restart your computer. Check that RStudio runs as expected.
P.S. You do not need shortcuts to R on your desktop, you will only be using RStudio.
install.packages(c("tidyverse", "devtools", "gt", "ggiraph", "webshot", "webshot2", "saros.base", "saros"))
::install_phantomjs()
webshot::edit_r_environ()
usethis# Add the following in the renviron-file being opened: LC_ALL="nb.utf8"
# Save file and restart RStudio
If problems occur, always try restarting RStudio before asking for help. Solves a lot of problems - same with your computer in general.
When you press Render for a document that contains R code, you may get an error message that R does not exist. It may be because you have installed R in a folder path that contains ÆØÅ, etc. The bug has been reported, but in the meantime you can try to install in the normal Program Files folder.
Error: unable to open file [somewhere] for writing [or reading]