me_labeller: Labeller function for plotting WGCNA modules in facet_grid or...

View source: R/me_labeller.R

me_labellerR Documentation

Labeller function for plotting WGCNA modules in facet_grid or facet_wrap

Description

This is a function to pass facet labels to ggplot functions facet_grid and facet_wrap, so that the facets have the module color name as the label. Basically, it strips off the "ME" and returns the label in a format that ggplot understands.

Usage

me_labeller(variable, value)

Arguments

variable

not used by this function. Included for compatibility with facet_grid and facet_wrap.

value

character vector containing the levels of the factor used for facetting. Generally passed directly to the function by facet_grid or facet_wrap.

Details

This function is intended to be used in faceting with facet_grid or facet_wrap, as follows: facet_grid(. ~ module, labeller = me_labeller).

Value

An object of the same dimension as value, with any "ME" strings removed from each element.


mjdufort/miscHelpers documentation built on Feb. 4, 2024, 7:44 p.m.