generateSinglePlot: Create a single violin distribution plot

Description Usage Arguments Value Author(s) Examples

View source: R/compareTaxaGroups.R

Description

Create a single violin distribution plot

Usage

1
generateSinglePlot(plotDf, parameters, variable)

Arguments

plotDf

dataframe for plotting containing values for each variable in in-group and out-group.

parameters

plot parameters, including size of x-axis, y-axis, legend and title; position of legend ("right", "bottom" or "none"); mean/median point; names of in-group and out-group; and plot title. NOTE: Leave blank or NULL to use default values.

variable

name of variable that need to be plotted (one of the column names of input dataframe plotDf).

Value

A violin plot as a ggplot object.

Author(s)

Vinh Tran tran@bio.uni-frankfurt.de

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data("mainLongRaw", package="PhyloProfile")
data <- mainLongRaw
inGroup <- c("ncbi9606", "ncbi10116")
varNames <- colnames(data)[c(4, 5)]
plotDf <- dataVarDistTaxGroup(data, inGroup, "101621at6656", varNames)
plotParameters <- list(
    "xSize" = 12,
    "ySize" = 12,
    "titleSize" = 15,
    "legendSize" = 12,
    "legendPosition" = "right",
    "mValue" = "mean",
    "inGroupName" = "In-group",
    "outGroupName" = "Out-group",
    "title" = "101621at6656"
)
generateSinglePlot(plotDf, plotParameters, colnames(plotDf)[1])

PhyloProfile documentation built on March 27, 2021, 6:01 p.m.