This package is still experimental.
Some features may change.


RcmdrPlugin.biostat is an Rcmdr plug-in for the most common data wrangling, visualization, and analysis tasks. It provides so-called BioStat (green) mode. In this mode, additional button bar appears:

NOTE: If an active dataset is not selected, some buttons are shaded in gray and are inactive.

This BioStat mode enables access to menus that use tidyverse family functions, as well as functions from other packages to perform some basic data wrangling, cleaning, plotting, preview and analysis tasks.

The documentation is available at gegznav.github.io/RcmdrPlugin.biostat.



Install the package

Preparation

Before you begin installation or updating, make sure that only a single R/RStudio session is running and restart the current R session (to unload the packages). It is also recommended to close the current RStudio project if you use one. Mac users need XQuartz to be installed (see also Notes for Mac users only) and opened during the installation. Windows users need Rtools if they want to install the package form GitHub.

Installation from GitHub

If you want to install the development version of the package from “GitHub”, use:

# Update all necessary CRAN packages
update.packages(ask = "graphics")

# Install required packages
if (!require("remotes"))  install.packages("remotes")

# Install RcmdrPlugin.biostat
remotes::install_github(
  "GegznaV/RcmdrPlugin.biostat", 
  dependencies = TRUE, upgrade = TRUE
)

In case you face installation issues, follow the instructions in the error message. You may also try removing upgrade = TRUE and manually choose the packages to update. It is always recommended to restart R session before the next installation too.

NOTE: the most common installation issue is related to R package rlang. Usually, you have to delete the indicated “00LOCK” directory (you may use pacman::p_unlock(), if you have package pacman installed, or delete the directory manually), restart the current R session and try to install again.


Load the plug-in

The easiest way to load RcmdrPlugin.biostat in BioStat (green) mode is to use RStudio addin:

Alternatively, use code:

Mac users should also read “Notes for Mac users only”.

When RcmdrPlugin.biostat is loaded, you can access its functionality through either the BioStat button bar (find figure above) or through BioStat'20 menu in the menu bar (shown as BioStat'19 in the example):

Turn on BioStat (green) mode

If you restarted R Commander and “BioStat” menu is present but button bar is missing, you may re-enable BioStat mode by selecting option “Mode: BioStat”:


Close BioStat mode

To close this mode, simply restart the R Commander:

  • R Commander menu bar → BioStat’20 → Session → Restart R Commander

You may use the following command as well:

Notes for Mac users only

For Mac users, there at least 2 things to pay attention to:

1) On Mac, R Commander opens only if XQuartz is opened. So, the first step of using R Commander is to make sure that XQuartz is opened. More information on “Installing R Commander for Mac users”.

2) Some Mac users also report that it is impossible to switch between languages while R Commander is running. This means, that some users might not use numbers if in the chosen language the same keys mean some non-English letters. Because of this, it is recommended to choose an appropriate language (usually English) before opening R/RStudio.


The other useful packages

Other useful Rcmdr plug-ins:

  1. RcmdrPlugin.EZR.as.menu – an R Commander plugin for the most common statistical analyses (functionality is the same as in RcmdrPlugin.EZR, except that RcmdrPlugin.EZR.as.menu creates a separate “EZR” menu in a menu bar and does not reorganize the original Rcmdr menus in the menu bar);
  2. RcmdrPlugin.KMggplot2 – an R Commander plugin for ggplot2 graphics.

To install these packages, use the following code:

# RcmdrPlugin.EZR.as.menu
remotes::install_github("GegznaV/RcmdrPlugin.EZR", ref = "ezr_as_menu")

# RcmdrPlugin.KMggplot2
install.packages("RcmdrPlugin.KMggplot2")

After the packages are installed, you can load them programmatically:

options(Rcmdr = list(
  plugins = c(
    "RcmdrPlugin.KMggplot2",
    "RcmdrPlugin.EZR.as.menu",
    "RcmdrPlugin.biostat",
    NULL
  ), 
  console.output = FALSE
))

library(Rcmdr)

If package Rcmdr is loaded and R Commander window is closed, instead of library(Rcmdr), use this code exactly once:

Important

Some functions in the package are based on and modified from functions in packages Rcmdr, and RcmdrPlugin.EZR. All of those packages are under the GPL-2/GPL-3 license.