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
- Host: GitHub
- URL: https://github.com/emitanaka/deggust
- Owner: emitanaka
- Created: 2021-01-01T09:39:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-12T23:20:51.000Z (over 1 year ago)
- Last Synced: 2025-04-02T02:35:46.666Z (about 2 months ago)
- Topics: ggplot-extension, rstats-package
- Language: R
- Homepage: https://deggust.emitanaka.org
- Size: 11 MB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.Rmd
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
[](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