Last data update: 2014.03.03

R: Convert a ellipsoidGate to a data.table useful for ggplot
fortify.ellipsoidGateR Documentation

Convert a ellipsoidGate to a data.table useful for ggplot

Description

It interpolates the ellipsoidGate to polygongate before fortifying it.

Usage

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

Arguments

model

ellipsoidGate

data

data range used for polygon interpolation.

...

not used.

Value

data.table

Examples

## Defining the gate
cov <- matrix(c(6879, 3612, 3612, 5215), ncol=2,
              dimnames=list(c("FSC-H", "SSC-H"), c("FSC-H", "SSC-H")))
mean <- c("FSC-H"=430, "SSC-H"=175)
eg <- ellipsoidGate(filterId= "myEllipsoidGate", .gate=cov, mean=mean)
fortify(eg)

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.ellipsoidGate.Rd_%03d_medium.png", width=480, height=480)
> ### Name: fortify.ellipsoidGate
> ### Title: Convert a ellipsoidGate to a data.table useful for ggplot
> ### Aliases: fortify.ellipsoidGate
> 
> ### ** Examples
> 
> ## Defining the gate
> cov <- matrix(c(6879, 3612, 3612, 5215), ncol=2,
+               dimnames=list(c("FSC-H", "SSC-H"), c("FSC-H", "SSC-H")))
> mean <- c("FSC-H"=430, "SSC-H"=175)
> eg <- ellipsoidGate(filterId= "myEllipsoidGate", .gate=cov, mean=mean)
> fortify(eg)
       FSC-H    SSC-H
 1: 512.9397 218.5497
 2: 512.2588 225.5586
 3: 510.2272 231.7374
 4: 506.8782 236.9845
 5: 502.2669 241.2138
 6: 496.4690 244.3559
 7: 489.5797 246.3592
 8: 481.7121 247.1908
 9: 472.9953 246.8370
10: 463.5726 245.3036
11: 453.5986 242.6159
12: 443.2372 238.8179
13: 432.6583 233.9720
14: 422.0359 228.1578
15: 411.5442 221.4708
16: 401.3555 214.0207
17: 391.6372 205.9298
18: 382.5488 197.3311
19: 374.2395 188.3658
20: 366.8459 179.1810
21: 360.4892 169.9275
22: 355.2739 160.7573
23: 351.2856 151.8210
24: 348.5897 143.2652
25: 347.2307 135.2306
26: 347.2307 127.8490
27: 348.5897 121.2416
28: 351.2856 115.5169
29: 355.2739 110.7689
30: 360.4892 107.0756
31: 366.8459 104.4976
32: 374.2395 103.0772
33: 382.5488 102.8378
34: 391.6372 103.7834
35: 401.3555 105.8983
36: 411.5442 109.1478
37: 422.0359 113.4787
38: 432.6583 118.8197
39: 443.2372 125.0832
40: 453.5986 132.1663
41: 463.5726 139.9527
42: 472.9953 148.3147
43: 481.7121 157.1148
44: 489.5797 166.2086
45: 496.4690 175.4467
46: 502.2669 184.6775
47: 506.8782 193.7494
48: 510.2272 202.5134
49: 512.2588 210.8257
50: 512.9397 218.5497
51: 512.9397 218.5497
       FSC-H    SSC-H
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>