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

https://github.com/emitanaka/deggust

An R-package to visualise edibble designs as ggplot graphics
https://github.com/emitanaka/deggust

ggplot-extension rstats-package

Last synced: about 2 months ago
JSON representation

An R-package to visualise edibble designs as ggplot graphics

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```

# deggust

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)

The aim for deggust R-package is to visualise designs constructed from the edibble R-package. The visualisation are ggplot graphics.

**(WIP)**

## Installation

The development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("emitanaka/deggust")
```

## Recipe experimental designs

You can see `deggust::autoplot()` used in various edibble designs at https://emitanaka.org/edibble-book/cookbook.html. Some samples are below.

## Examples

```{r}
library(edibble)
library(deggust)
```

```{r}
fac <- takeout(menu_factorial(trt = c(3, 2)))
fac
```
```{r}
autoplot(fac)
```
```{r}
hyper_graeco <- takeout(menu_hyper_graeco(t = 6))
hyper_graeco
```
```{r}
autoplot(hyper_graeco)
```

Automatic look into the design layout:

```{r}
unit1 <- start_design(name = "One unit") %>%
set_trts(trt = 4) %>%
set_units(unit = 16) %>%
allocate_trts(trt ~ unit) %>%
randomise_trts() %>%
serve_table()

autoplot(unit1)
```

Easy to replace the unit shape:

```{r}
autoplot(unit1, shape = "box")
```

```{r}
autoplot(unit1, shape = "triangle")
```

```{r}
autoplot(unit1, shape = "hexagon",
text = element_text(size = 6,
color = "gray",
face = "bold"))
```

## Related work

* `desplot` for visualising designs
* `ExploreModelMatrix` for exploring design matrix
* `ez` for easy analysis and visualization of factorial experiments