Part 01. Install R and Rcmdr
Learning objectives
- Install the R software and script editing (eg, the R Commander) package on their computer or access R via a cloud platform (eg, Google Colaboratory).
- Launch R and their selected script editor following installation, enabling students to begin using R for work with R code and R commands.
- Select between local and cloud-based platforms to ensure consistent access to R for coursework.
What’s on this page
- Setup R on your computer or choose a Cloud option.
- Setup R Commander on your computer.
- Setup Google CoLab access.
- Quiz.
1. Setup R on your computer or choose a Cloud option.
Before we can begin our work we need to set up access to the R programming language and provide a script editor. Students may choose to install R onto their personal computers or use R in the Cloud, with no need to install software.
Note 1: “Computer” for our purposes refers only to devices running Linux, macOS, or Windows operating systems. R and related R packages can not be installed — gracefully, at least — to iPads or other tablets, nor onto smartphones like iPhone or Android phones. While these devices are very much computers — and, arguably, are much more capable than many of the consumer level computers prior to 2010s — R and related support software were not written for the kinds of processors that run tablets and smartphones. It is recommended that users of such devices rely on running R “in the Cloud,” eg, Google CoLab.
R, and the numerous packages which extend the capabilities of the base R language, is built by thousands of programmers to handle data processing and statistics problems, from very simple calculations to use of sophisticated optimization algorithms. Basic installation instructions are provided in the Appendix of Mike’s Biostatistics Book.
- Install R and
Rcmdron your computer (eg, laptop or desktop running macOS or Windows 10/11 Home or Pro versions). - If you do not have a computer, then your access to R will be in the Cloud
2. Setup R Commander package on your computer
CoLab, skip this step. R installed to your computer comes with a limited user interface and all R commands are entered and run from a single line, or command line interpreter. The base installation on computers includes a script editor. A script editor keeps your R work organized by letting you write, save, and rerun code. It turns R into a practical workspace for biostatistics.
Most users of R work with an IDE like RStudio or Visual Studio. For students in my biostatistics course I highly recommend install an R package called R Commander, or Rcmdr for short. This package provides a graphical user interface with provides easy access to many R statistical and data processing functions via menu driven lists. Like RStudio, R Commander also provides windows or parts, each providing access to different functions in a biostatistics workflow. R Commander installation instructions are provided in the Appendix of Mike’s Biostatistics Book
For more about R packages, see Part 05. R packages: Making R do more
3. Setup Google CoLab access
Running R in a service like Google Colaboratory is an excellent option for (bio)statistics students because it allows students to focus on statistical concepts rather than setup hassles. It is also the only practical option is the student intends to work from an iPad or SmartPhone device. While I recommend Google CoLab, other options are available, and detailed instructions are provided at Use R in the Cloud in Mike’s Biostatistics Book.
4. Page quiz
Quiz01 – Mike’s Biostatistics Workbook
Part 01. Install R and R Commander