organizeData: A function to organize a tibble into tidy format and perform...

Description Usage Arguments Value Examples

Description

This function will organize a tibble into tidy format and perform count transformations if appropriate columns are specified.

Usage

1
2
3
organizeData(data = NULL, exclude = NULL, comp = NULL,
  comps = NULL, variables = NULL, id = NULL, beadColumn = NULL,
  dilutionColumn = NULL)

Arguments

data

A tibble

exclude

A list of columns to exclude from gather

comp

the name of comparison column

comps

A vector of names of the comparisons

variables

A vector of the variables to be plotted

id

The name of unique identifier column

beadColumn

The column name that has total number of beads/sample

dilutionColumn

The column name that has dilution factor for each sample 1/x

Value

Tibble in tidy format based on columns chosen to be excluded. Count data will be transformed if appropriate columns are present.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
iris %>% dplyr::mutate(Species = as.character(Species)) %>%
dplyr::group_by(Species) %>%
dplyr::mutate(Sample = paste0(Species, "_", dplyr::row_number()),
Sheet = "iris") %>%
dplyr::select(Sample, Sheet, Species, dplyr::everything()) %>%
plotGrouper::organizeData(data = .,
exclude = c("Sample", "Sheet", "Species"),
comp = "Species",
comps = c("setosa", "versicolor", "virginica"),
variables = "Sepal.Length",
id = "Sample",
beadColumn = "none",
dilutionColumn = "none")

jdgagnon/plotGrouper documentation built on May 14, 2019, 11:12 a.m.