Skip to content

csoneson/ExploreModelMatrix

Repository files navigation

ExploreModelMatrix

Codecov.io coverage status R build status

ExploreModelMatrix is a small R package that lets the user interactively explore a design matrix as generated by the model.matrix() R function. In particular, given a table with sample information and a design formula, ExploreModelMatrix illustrates the fitted values from a general linear model (or, more generally, the value of the linear predictor of a generalized linear model) for each combination of input variables, simplifying understanding and generation of contrasts. A number of other visualizations are also included in the interactive interface, particularly simplifying the interpretation of linear models.

Installation

You can install ExploreModelMatrix from Bioconductor (note that you need at least release 3.11 of Bioconductor, released in April 2020):

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("ExploreModelMatrix")

Usage

The main function in the ExploreModelMatrix package is called ExploreModelMatrix(). When calling ExploreModelMatrix(), simply provide a data.frame (or DataFrame) with sample information and a design formula:

sampleData <- data.frame(genotype = rep(c("A", "B"), each = 4),
                         treatment = rep(c("ctrl", "trt"), 4))
ExploreModelMatrix(sampleData = sampleData,
                   designFormula = ~ genotype + treatment)

This will open up an R/Shiny application where you can explore the specified design matrix and the fitted values for each combination of predictor values.

For more examples of designs, we refer to the package vignette.

About

Explore design matrices interactively with R/Shiny

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages