Below are steps to install R base and R Studio. R Studio provides a great programming environment to access and manage all R objects.
1. Read How to Download R and RStudio article
2. View Install R Packages Video
3. Check Hardware Configuration to confirm minimum hardware and memory (Workbench, Connect, Package Manager)
4. Install R 4.0.4 for Windows or Mac
5. Install RStudio Desktop, IDE
6. Click R icon in Desktop
7. Select US option for CRAN mirror
# 1. install R windows (32 or 64 bit) # https://cran.rstudio.com
# 2. download R studio # https://www.rstudio.com/products/rstudio/download
# 3. Double click on R icon
# 4. Please select a CRAN mirror for use in this session # Select US option for internal setting.
setwd("C:/study/analysis/output") # change default working folder
getwd() # confirm working folder
Once R is installed, you will view several windows.
Code Editor window
• Area for code development
• Code will not be evaluated or executed until you hit the 'Run' button
Workspace window
• Environment / History window
• List objects that exist in the working space • View comment history (like SAS log)
Console window
• Here code from the script source is evaluated by R
• Also allows you to perform quick calculations that you don't need to save
Notebook window
• Files/Plots/Packages/Help
• Here you can see file folders, plot output, browse and install available packages, access R help