Last data update: 2014.03.03

R: Convert a filterList to a data.table useful for ggplot
fortify.filterListR Documentation

Convert a filterList to a data.table useful for ggplot

Description

It tries to merge with pData that is associated with filterList as attribute 'pd'

Usage

## S3 method for class 'filterList'
fortify(model, data = NULL, nPoints = NULL, ...)

Arguments

model

filterList

data

data range used for polygon interpolation

nPoints

used for interpolating polygonGates to prevent it from losing shape when truncated by axis limits

...

not used.

Value

data.table

Examples

dataDir <- system.file("extdata",package="flowWorkspaceData")
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
gates <- getGate(gs, "CD4")
gates <- as(gates, "filterList") #must convert list to filterList in order for the method to dispatch properly
fortify(gates)

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(ggcyto)
Loading required package: ggplot2
Loading required package: flowCore
Loading required package: ncdfFlow
Loading required package: flowViz
Loading required package: lattice
Loading required package: RcppArmadillo
Loading required package: BH
Loading required package: flowWorkspace
Loading required package: gridExtra
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ggcyto/fortify.filterList.Rd_%03d_medium.png", width=480, height=480)
> ### Name: fortify.filterList
> ### Title: Convert a filterList to a data.table useful for ggplot
> ### Aliases: fortify.filterList
> 
> ### ** Examples
> 
> dataDir <- system.file("extdata",package="flowWorkspaceData")
> gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
loading R object...
loading tree object...
Done
> gates <- getGate(gs, "CD4")
> gates <- as(gates, "filterList") #must convert list to filterList in order for the method to dispatch properly
> fortify(gates)
    <B710-A>   <R780-A>               .rownames
 1: 3536.867 1113.68414 CytoTrol_CytoTrol_1.fcs
 2: 3532.656 1247.22087 CytoTrol_CytoTrol_1.fcs
 3: 3520.093 1377.81481 CytoTrol_CytoTrol_1.fcs
 4: 3499.385 1503.32159 CytoTrol_CytoTrol_1.fcs
 5: 3470.870 1621.68041 CytoTrol_CytoTrol_1.fcs
 6: 3435.018 1730.94781 CytoTrol_CytoTrol_1.fcs
 7: 3392.417 1829.32962 CytoTrol_CytoTrol_1.fcs
 8: 3343.767 1915.21043 CytoTrol_CytoTrol_1.fcs
 9: 3289.866 1987.18006 CytoTrol_CytoTrol_1.fcs
10: 3231.600 2044.05678 CytoTrol_CytoTrol_1.fcs
11: 3169.925 2084.90667 CytoTrol_CytoTrol_1.fcs
12: 3105.853 2109.05899 CytoTrol_CytoTrol_1.fcs
13: 3040.438 2116.11714 CytoTrol_CytoTrol_1.fcs
14: 2974.753 2105.96525 CytoTrol_CytoTrol_1.fcs
15: 2909.876 2078.76999 CytoTrol_CytoTrol_1.fcs
16: 2846.874 2034.97791 CytoTrol_CytoTrol_1.fcs
17: 2786.780 1975.30809 CytoTrol_CytoTrol_1.fcs
18: 2730.581 1900.74029 CytoTrol_CytoTrol_1.fcs
19: 2679.199 1812.49892 CytoTrol_CytoTrol_1.fcs
20: 2633.480 1712.03289 CytoTrol_CytoTrol_1.fcs
21: 2594.173 1600.99187 CytoTrol_CytoTrol_1.fcs
22: 2561.923 1481.19913 CytoTrol_CytoTrol_1.fcs
23: 2537.261 1354.62168 CytoTrol_CytoTrol_1.fcs
24: 2520.591 1223.33790 CytoTrol_CytoTrol_1.fcs
25: 2512.187 1089.50348 CytoTrol_CytoTrol_1.fcs
26: 2512.187  955.31597 CytoTrol_CytoTrol_1.fcs
27: 2520.591  822.97874 CytoTrol_CytoTrol_1.fcs
28: 2537.261  694.66474 CytoTrol_CytoTrol_1.fcs
29: 2561.923  572.48090 CytoTrol_CytoTrol_1.fcs
30: 2594.173  458.43347 CytoTrol_CytoTrol_1.fcs
31: 2633.480  354.39511 CytoTrol_CytoTrol_1.fcs
32: 2679.199  262.07411 CytoTrol_CytoTrol_1.fcs
33: 2730.581  182.98640 CytoTrol_CytoTrol_1.fcs
34: 2786.780  118.43059 CytoTrol_CytoTrol_1.fcs
35: 2846.874   69.46668 CytoTrol_CytoTrol_1.fcs
36: 2909.876   36.89866 CytoTrol_CytoTrol_1.fcs
37: 2974.753   21.26130 CytoTrol_CytoTrol_1.fcs
38: 3040.438   22.81135 CytoTrol_CytoTrol_1.fcs
39: 3105.853   41.52338 CytoTrol_CytoTrol_1.fcs
40: 3169.925   77.09012 CytoTrol_CytoTrol_1.fcs
41: 3231.600  128.92758 CytoTrol_CytoTrol_1.fcs
42: 3289.866  196.18457 CytoTrol_CytoTrol_1.fcs
43: 3343.767  277.75676 CytoTrol_CytoTrol_1.fcs
44: 3392.417  372.30471 CytoTrol_CytoTrol_1.fcs
45: 3435.018  478.27597 CytoTrol_CytoTrol_1.fcs
46: 3470.870  593.93047 CytoTrol_CytoTrol_1.fcs
47: 3499.385  717.36919 CytoTrol_CytoTrol_1.fcs
48: 3520.093  846.56525 CytoTrol_CytoTrol_1.fcs
49: 3532.656  979.39727 CytoTrol_CytoTrol_1.fcs
50: 3536.867 1113.68414 CytoTrol_CytoTrol_1.fcs
51: 3536.867 1113.68414 CytoTrol_CytoTrol_1.fcs
    <B710-A>   <R780-A>               .rownames
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>