BIOSTATISTICS SERIES


https://doi.org/10.5005/jp-journals-10028-1453
Journal of Postgraduate Medicine Education and Research
Volume 55 | Issue 4 | Year 2021

Statistics Corner: Introduction to R and R Commander (Rcmdr)


Kamal Kishore 1 , Vidushi Jaswal 2

1Department of Biostatistics, Postgraduate Institute of Medical Education and Research, Chandigarh, India
2Department of Psychology, Mehr Chand Mahajan DAV College for Women, Chandigarh, India

Corresponding Author: Kamal Kishore, Department of Biostatistics, Postgraduate Institute of Medical Education and Research, Chandigarh, India, Phone: +91 9591349768, e-mail: kkishore.pgi@gmail.com

How to cite this article Kishore K, Jaswal V. Statistics Corner: Introduction to R and R Commander (Rcmdr). J Postgrad Med Edu Res 2021;55(4):192–196.

Source of support: Nil

Conflict of interest: None

REALITY CHECK

Data collection and analysis is an integral component of medical research. Still, many medical students feel anxious while taking statistics courses—these are perceived as dry, dull, technical, and non-useful for clinical practice by medical students. Medical institutes struggle to motivate students to take statistics seriously—despite being, the same is necessary to capture, analyze, interpret, and understand patient data. The interest in statistics drops further when PowerPoint presentations full of notations and equations are used to teach. It is challenging for students to connect clinical practices with the utility of statistics. The time for rote teaching and training are the things of the past. 21st century problems demand 21st century solutions. It is better to teach statistics in a computer lab loaded with statistical software and actual medical data. Many institutes and departments have computer labs, but purchasing and renewing commercial statistical software is costly. Therefore, the question arises, is there any non-commercial easy-to-use reliable statistical software? A quick google search can display a long list of packages. However, almost all softwares restrict users in one way or the other. Of late, the adoption and popularity of R-software in the academic world have grown exponentially. R can be used, shared, and modified without any restriction. However, few doubts need clarification before adopting R in routine teaching and training.

INTRODUCTION

Statistics is a fundamental requirement in conducting objective and unbiased medical and clinical research. Continuous medical and clinical improvements occur using various statistical tools such as study designs, sample size, data management, analysis, and interpretation of results. Therefore, acquiring and applying statistical skills is an integral component of undergraduate and postgraduate medical training. However, anxiety related to statistics remained a significant impediment to learn, use and retain the same in routine practice. 1 Thus, a foremost challenge in front of statistics experts is: how to engage and make statistics learning exciting and engaging to medical students?

The majority of students feel that statistics is complicated than medical subjects. 2 Many students also develop a passive attitude to learn and attend statistics classes without realizing the need. It may be due to their past experiences in mathematics, teaching, and training. 2,3 However, faculty may adopt two fundamental approaches to address student’s concerns. The first is to highlight that statistics is different from mathematics. The second and more important is teaching, training, and evaluating student’s in a computer lab pre-loaded with medical data and statistical software. To make it exciting and engaging, use single specialization-specific medical data to teach and practice most statistical methods. An important point to emphasize repeatedly during the class is to focus on application rather than learning theory and formulae. The purist might disagree, but the primary responsibility of a teacher is to inspire learning.

The current generation is tech-savvy. Therefore, we need to assimilate technology in teaching and training. Any acquired skill evaporates due to a lack of interest and practice. It is pertinent to select appropriate software to integrate statistics learning with routine medical training. There are various popular software such as SPSS, STATA, MINITAB, SAS, and R for users. Each software has its advantage and disadvantages. However, the biggest hindrance is that students and institutes have to pay a large sum to purchase. Medical students also need money to buy chemicals and medical equipment—purchasing costly statistical software is the last thing in their minds. Institutional support is also limited to accessing computer labs for students at fixed times during working days. Due to the non-availability of 24-hour accessibility, many students find it challenging to practice and retain statistical learning. The 24-hour accessibility is significant as medical students primarily manage and operate patients during working hours. Night duty is also a routine affair. Therefore, the current manuscript will discuss popular, freely available, downloadable, and easily operable menu-driven packages in R-software.

Figs 1A to C: (A) Screenshot of EZR website depicting the package details; (B) Easier method for beginners; (C) Default installation of EZR

What are R and Rcmdr?

R is open-source software for data management, visualization, and analysis. 4 A key advantage of R is that it gives users the freedom to use, modify, personalize, and share the same with others under GNU General Public License. 5 Most users are aware and use the standard command-driven R-Graphical User Interface (GUI). The programming aspect of R makes it non-appealing to adopt and teach statistics to medical students using R. However, the R commander (Rcmdr) GUI is a menu-driven add-on package for data analysis in the R-environment. The base Rcmdr package comes with a host of statistical techniques. Researchers can enhance the capabilities of Rcmdr with add-on packages. Thus, the first natural question which comes to mind is how to download and install the original Rcmdr software?

Installing R and Rcmdr

The base R package is a fundamental requirement to install Rcmdr and other add-on packages. The process to download and install R is lengthy, time-consuming, and technical for non-programmer. However, EZR (Easy R) automatically installs R and Rcmdr with add-ons in one go. To install Rcmdr, search EZR on the Internet. The search result will take the user to the EZR website to download the software. 6 EZR is available for Windows, Mac, and Ubuntu operating systems. A researcher may use a different browser (such as Google, Safari, and Microsoft Edge) if the software fails to respond for downloading. We assume that the majority use Microsoft windows–thus, we are discussing the installation of EZR for windows. The Mac users can follow the links to download and install EZR in the tutorial link given after the conclusion section of the manuscript.

The website in Figure 1A displays two easy options to install Rcmdr. Click directly on the Softpedia or EZR ( EZRsetupENG.exe ) option available under the “EZR for Windows” tab on the website. To download, click on the link in Figures 1A or B. After downloading the file on the computer, double-click the file for installation. The “C” drive is the default option for installing software—the user may change default settings by clicking on browse (Fig. 1C). After selecting the drive, click on next to install.

The installation will install R, Rcmdr, and EZR without any separate command and hassle. The link will create two shortcuts of R-EZR, each for 32- and 64-bit for the 64-bit version. Click on 64-bit R-EZR to open R and Rcmdr, as displayed in Figure 2. A significant drawback of R-packages is the inter-dependency of the independent packages written by different authors. Due to this, many packages become obsolete over time and are eliminated from future developments. Therefore, it is better to keep track of the package. However, two significant advantages are that users can retrieve old packages from the R-directory and maintain multiple versions of the same package.

Fig. 2: Displays the R Commander in front and R Console in background

Fig. 3: Display the process of recalling plug-in (s)

Installing Packages

A package is an extension of R consisting of a bundle of codes, documentation, attached datasets, and functions to apply statistical analysis. By default, Rcmdr comes with few special statistical packages. Researchers can enhance the analysis capacity of Rcmdr by installing Rcmdr plug-ins. A significant advantage of downloading Rcmdr through EZR is that it downloads the majority of add-ons by default. However, few add-ons such as EBM and FactoMineR are not available by default. The non-default plug-ins are accessible to the user through “ Load Commander Plug-ins ” under the Tools menu. Figure 3 displays the list of available plug-ins that can be activated by clicking on the specific plug-in and pressing the ok button. Rcmdr will display a message to restart—Click yes to proceed. Rcmdr will appear with an add-on package on the extreme right side of the “original menu,” as shown in Figure 3. Most users may not require to opt for plug-ins options as most frequently used statistical techniques in medical research are available with base Rcmdr.

Rcmdr Interface

Rcmdr, like R, is based on minimalistic design philosophy. It comes with eight default menu options. Figure 4 displays a comprehensive list of statistical analysis options. The generic functionality of the main functions in each Menu of Rcmdr is summarized in Table 1. The toolbar menu with various buttons is given below the main menu. Toolbar automatically activates after loading data in Rcmdr. The toolbar provides functionality to the user in terms of viewing, editing, and renaming datasets. The model will provide flexibility to work with specific models during the data analysis. There are two tabs named “R Script” and “R Markdown” with a windowpane immediately below the toolbar. All the commands generated during data analysis will be displayed in “R Script”. It is a good starting point to observe, learn and practice R-coding for a gradual shift from menu-driven to code-driven analysis. The coding helps the user to unleash and utilize the true potential of R. The output pane displays the output from data analysis. Finally, the bottom pane shows the color-coded messages related to data, assumptions, analysis, and packages.

CONCLUSION

Statistical software is essential for data management and analysis. It is also vital to actively engage, teach, train and evaluate the medical students. However, almost all the commercial statistical packages are costly to purchase and renew. Therefore, many institutes take a passive approach to teach, train, and evaluate medical students with theoretical statistics and manual calculations. The institutes that can afford to purchase and teach with the commercial software limit student’s engagement and learning to restricted working hours and computers. The students are not provided with the software to practice and become friendly with analysis. However, Rcmdr is a freely available tool to the researchers for sharing and training. Therefore, institutes should integrate and emphasize concepts of statistics teaching with Rcmdr.

Fig. 4: Screenshot of commonly used statistical methods that are available with base Rcmdr

Table 1: Summarizing the basic properties of a menu in the R Commander version 2.6–2
Dropdown menu A broad description of the functions
File A menu for data entry, import, and rename of various kinds of files
Edit A menu to edit text and output to get desired outcomes
Active datasets A menu to code, recode, and modify active datasets
Statistics A set of menu and submenu that classify various statistical tests
Graph A menu to make and edit charts
Models A menu of specific summaries (such as p value, CI) for the selected model
Tools A menu to activate add-on packages in the Rcmdr
Help A menu that explains R and Rcmdr in detail

Tutorial Link

  • EZR for medical Statistics by the author of EZR— https://www.nature.com/articles/bmt2012244
  • The R Commander: A Basic Statistics GUI for R by the author of Rcmdr— https://socialsciences.mcmaster.ca/jfox/Misc/Rcmdr/

ACKNOWLEDGMENTS

We acknowledge Dr Vishal Sharma, from the Department of Gastroenterology, PGIMER-Chandigarh, for his valuable time and inputs to improve the quality of the article.

REFERENCES

1. Hannigan A, Hegarty AC, McGrath D. Attitudes towards statistics of graduate entry medical students: the role of prior learning experiences. BMC Med Educ 2014;14(1):70. DOI: 10.1186/1472-6920-14-70.

2. Freeman JV, Collier S, Staniforth D, et al. Innovations in curriculum design: a multi-disciplinary approach to teaching statistics to undergraduate medical students. BMC Med Educ 2008;8(1):28. DOI: 10.1186/1472-6920-8-28.

3. Zhang Y, Shang L, Wang R, et al. Attitudes toward statistics in medical postgraduates: measuring, evaluating and monitoring. BMC Med Educ 2012;12(1):117. DOI: 10.1186/1472-6920-12-117.

4. The R Foundation. What is R. https://www.r-project.org/about.html ( accessed 28 August 2021).

5. Free Software Foundation I. GNU General Public License. 1991. https://www.r-project.org/COPYING ( accessed 28 August 2021).

6. Kanda Y. Free Statistical Software: EZR on R commander. https://www.jichi.ac.jp/saitama-sct/SaitamaHP.files/statmedEN.html (2012, accessed 28 August 2021).

________________________
© The Author(s). 2021 Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by-nc/4.0/), which permits unrestricted use, distribution, and non-commercial reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.