Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/GegznaV/RcmdrPlugin.biostat

:heavy_check_mark: BioStat mode for R Commander (Rcmdr): improved functions, menus, and buttons (R package)
https://github.com/GegznaV/RcmdrPlugin.biostat

gui r r-commander rcmdrplugin

Last synced: about 2 months ago
JSON representation

:heavy_check_mark: BioStat mode for R Commander (Rcmdr): improved functions, menus, and buttons (R package)

Awesome Lists containing this project

README

        

---
output: github_document
---


```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = FALSE, fig.height = 4, fig.width = 6,
comment = "#>",
fig.path = "README-"
)
```

***

[![CRAN status](https://www.r-pkg.org/badges/version/RcmdrPlugin.biostat)](https://cran.r-project.org/package=RcmdrPlugin.biostat)
[![GitHub version](https://img.shields.io/badge/GitHub-v`r packageVersion("RcmdrPlugin.biostat")`-brightgreen.svg)](https://github.com/GegznaV/RcmdrPlugin.biostat)
[![R build status](https://github.com/GegznaV/RcmdrPlugin.BioStat/workflows/R-CMD-check/badge.svg)](https://github.com/GegznaV/RcmdrPlugin.BioStat/actions)
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![Documentation](https://img.shields.io/badge/Documentation-`r gsub('-', '--', Sys.Date())`-yellowgreen.svg)]()

***

```{r include=FALSE}
fig_dir <-
"https://raw.githubusercontent.com/GegznaV/RcmdrPlugin.biostat/master/inst/etc/fig/"

knitr::opts_chunk$set(fig.align = "center")
```

```{r logo-local, fig.align='center', out.height='30%', out.width='30%',echo=FALSE}
knitr::include_graphics(paste0(fig_dir, "logo.png"))
```

R Commander Plug-in for Basic Data Management and Analysis Tasks {#intro}
==============================================================================



This package is still experimental.

Some features may change.

**RcmdrPlugin.biostat** is an [**Rcmdr**](https://CRAN.R-project.org/package=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:

```{r, echo=FALSE, fig.cap=CAPTION}
knitr::include_graphics(paste0(fig_dir, "05--buttons-in-biostat-mode.png"))

CAPTION <- ""
```

**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](https://gegznav.github.io/RcmdrPlugin.biostat){target="_blank"}.


***

## Install the Package {#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*](http://www.xquartz.org/){target="_blank"} to be installed (see also [Notes for *Mac* users only](#notes-for-mac-users-only)) and opened during the installation.
*Windows* users need [*Rtools*](https://cloud.r-project.org/bin/windows/Rtools/){target="_blank"} if they want to install the package form GitHub.

### Installation (Recommended)

The most convenient way is to install the package form CRAN-like repository:

```{r install-biostat, eval=FALSE}
repos <- c("https://mokymai.github.io/download/", getOption("repos"))
install.packages("RcmdrPlugin.biostat", repos = repos)
```

### Installation from GitHub

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

```{r install-biostat-github, eval=FALSE}
# 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`{.r} 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()`{.r}](https://trinker.github.io/pacman/p_unlock.html){target="_blank"}, if you have package [**pacman**](https://trinker.github.io/pacman){target="_blank"} installed, or delete the directory manually), restart the current *R* session and try to install again.

***

## Load the Plug-in {#load}

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

```{r fig-00, echo=FALSE, fig.cap=CAPTION}
knitr::include_graphics(paste0(fig_dir, "00-addin-to-load-biostat-mode.png"))

CAPTION <- ""
```

Alternatively, use code:

```{r eval=FALSE}
library(Rcmdr)
library(RcmdrPlugin.biostat)
load_rcmdr_biostat_mode()
```

*Mac* users should also read "[Notes for *Mac* users only](#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` menu in the menu bar (shown as `BioStat'19` in the example):

```{r, echo=FALSE, fig.cap=CAPTION}
knitr::include_graphics(paste0(fig_dir, "03--biostat-plugin-loaded.png"))

CAPTION <- ""
```

### Turn on *BioStat* (Green) Mode {#turn-on-biostat-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":

```{r, echo=FALSE, fig.cap=CAPTION}
knitr::include_graphics(paste0(fig_dir, "04--activate-biostat-mode.png"))

CAPTION <- ""
```


### Close *BioStat* Mode {#close-biostat-mode}

To close this mode, simply restart the *R Commander*:

* R Commander menu bar → BioStat → Session → Restart R Commander

You may use the following command as well:

```{r eval=FALSE}
restart_commander()
```

### Notes for *Mac* Users Only {#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*](http://www.xquartz.org/){target="_blank"} 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"](https://murraystate.instructure.com/courses/1252125/pages/installing-r-commander-on-your-mac){target="_blank"}.

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*.

# 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.

***