Last data update: 2014.03.03

R: One-dimensional density plots for flowPlates
densityplotR Documentation

One-dimensional density plots for flowPlates

Description

This function is a modified version of densityplot from the flowViz package that allows for multiple flowFrames per panel. flowViz densityplot plots the density curves in a one per panel style, while the flowPlate densityplot can overlay densities.

Usage

## S4 method for signature 'formula,flowPlate'
densityplot(x, data, xlab,
    prepanel=prepanel.densityplot.flowPlate,
    panel = panel.densityplot.flowPlate,
    as.table=TRUE,
    filterResult=NULL,
    ...)

Arguments

x

A formula describing the layout of the plots.

data

A flowPlate.

xlab

Label for the x-axis

prepanel

Lattice-flowViz prepanel function.

panel

Lattice-flowViz panel function.

as.table

Defaults to table layout.

filterResult

filterResult can either take the character string "Negative.Control" and have the negative control wells added to the panels, or if filterResult is a flowFrame then the density curve for the flowFrame will be added to each panel.

...

optional arguments

Other arguments are identical to densityPlot from flowViz.

See Also

flowViz::densityplot

Examples

# Load the plateCore package and data
library(plateCore)
data(plateCore)

# Create a flowPlate from the sample data in plateCore
fp <- flowPlate(pbmcPlate,wellAnnotation,plateName="P1")

# Overlay the first 3 flowFrames.  If the groups argument was
# omitted, then the flowFrames would be combined into a single
# density curve.
densityplot(~ `FSC-H`, fp[1:3], groups=name, auto.key=TRUE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(plateCore)
Loading required package: flowCore
Loading required package: flowViz
Loading required package: lattice
Loading required package: latticeExtra
Loading required package: RColorBrewer

Attaching package: 'latticeExtra'

The following object is masked from 'package:flowViz':

    ecdfplot

sROC 0.1-2 loaded
No methods found in "flowStats" for requests: %on%
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/plateCore/densityplot-methods.Rd_%03d_medium.png", width=480, height=480)
> ### Name: densityplot
> ### Title: One-dimensional density plots for flowPlates
> ### Aliases: densityplot densityplot-method
> ###   densityplot,formula,flowPlate-method
> ###   densityplot,formula,flowPlate,ANY,ANY,ANY,missing-method
> ### Keywords: methods dplot
> 
> ### ** Examples
> 
> # Load the plateCore package and data
> library(plateCore)
> data(plateCore)
> 
> # Create a flowPlate from the sample data in plateCore
> fp <- flowPlate(pbmcPlate,wellAnnotation,plateName="P1")
> 
> # Overlay the first 3 flowFrames.  If the groups argument was
> # omitted, then the flowFrames would be combined into a single
> # density curve.
> densityplot(~ `FSC-H`, fp[1:3], groups=name, auto.key=TRUE)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>