2.4 Install R: Windows

Summary

  1. Visit https://cloud.r-project.org/;
  2. Tap Download R for Windows;
  3. Tap install R;
  4. Download R-n.n.n for Windows;
  5. Open the downloaded exe to install R choosing all the defaults;
  6. Add C:\Program Files\R\R-n.n.n\bin to your PATH (see below);
  7. Start R in a Command Prompt;
  8. Run install.packages() as in Section 2.1.

Details

A key part of installing R on Windows is to update what is called an environment variable of the name PATH. This is to tell Windows the location where you have installed R so that Rattle can find R. It has been reported that sometimes you will need to reboot Windows for the PATH to take effect.

  • Visit https://cloud.r-project.org/ and navigate to Windows install;
  • Click on Download R for Windows and then install R for the first time and then the Download R-4.6.1 for Windows (noting the version number here is 4.6.1, but could be updated);
  • Open the downloaded exe file and install R with all defaults into C:\Program Files\R\R-4.6.1;
  • Add C:\Program Files\R\R-4.6.1 to the PATH environment variable:
    • Open Control Panel and choose Edit the system environment variables or search for environment in the search bar
    • Click Environment Variables…
    • Under User variables for … click the Path entry and then Edit…
    • Click New and then add C:\Program Files\R\R-4.6.1
    • Click OK a few times to close the windows.
  • Start a Command Prompt, type R and then press Enter to run R. Install the requisite R packages with the install.packages() command in Section 2.1 (copy the command and paste into the Command Prompt.
  • You will be asked Please select a CRAN mirror for use in this session. Its okay to go with 0-Cloud [https]. The installation can take 5 or more minutes, depending on your Internet connection.

Test that this works for the normal user by starting up the Command Prompt, running R, and then, for example library(ada).



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0