... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Package: flowWorkspace |
2 | 2 |
Type: Package |
3 | 3 |
Title: Infrastructure for representing and interacting with the gated cytometry |
4 |
-Version: 3.27.25 |
|
4 |
+Version: 3.27.26 |
|
5 | 5 |
Date: 2011-06-10 |
6 | 6 |
Author: Greg Finak, Mike Jiang |
7 | 7 |
Maintainer: Greg Finak <gfinak@fhcrc.org>,Mike Jiang <wjiang2@fhcrc.org> |
... | ... |
@@ -61,8 +61,8 @@ getStats.GatingSet <- function(x, ...){ |
61 | 61 |
#' when character, it is expected to be either "count" or "percent". Default is "count" (total number of events in the populations). |
62 | 62 |
#' when a function, it takes a flowFrame object through 'fr' argument and return the stats as a named vector. |
63 | 63 |
#' @param inverse.transform logical flag . Whether inverse transform the data before computing the stats. |
64 |
- |
|
65 |
-getStats.GatingHierarchy <- function(x, nodes = NULL, type = "count", inverse.transform = FALSE, ...){ |
|
64 |
+#' @param stats.fun.arg a list of arguments passed to `type` when 'type' is a function. |
|
65 |
+getStats.GatingHierarchy <- function(x, nodes = NULL, type = "count", inverse.transform = FALSE, stats.fun.arg = list(), ...){ |
|
66 | 66 |
gh <- x |
67 | 67 |
if(is.null(nodes)) |
68 | 68 |
nodes <- getNodes(gh, ...) |
... | ... |
@@ -90,7 +90,10 @@ getStats.GatingHierarchy <- function(x, nodes = NULL, type = "count", inverse.tr |
90 | 90 |
trans <- transformList(names(trans), trans) |
91 | 91 |
fr <- transform(fr, trans) |
92 | 92 |
} |
93 |
- res <- type(fr) |
|
93 |
+ thisCall <- quote(type(fr)) |
|
94 |
+ thisCall <- as.call(c(as.list(thisCall), stats.fun.arg)) |
|
95 |
+ |
|
96 |
+ res <- eval(thisCall) |
|
94 | 97 |
} |
95 | 98 |
|
96 | 99 |
as.data.table(t(res)) |
... | ... |
@@ -14,7 +14,7 @@ getStats(x, ...) |
14 | 14 |
\method{getStats}{GatingSet}(x, ...) |
15 | 15 |
|
16 | 16 |
\method{getStats}{GatingHierarchy}(x, nodes = NULL, type = "count", |
17 |
- inverse.transform = FALSE, ...) |
|
17 |
+ inverse.transform = FALSE, stats.fun.arg = list(), ...) |
|
18 | 18 |
} |
19 | 19 |
\arguments{ |
20 | 20 |
\item{x}{a GatingSet or GatingHierarchy} |
... | ... |
@@ -29,6 +29,8 @@ when character, it is expected to be either "count" or "percent". Default is "co |
29 | 29 |
when a function, it takes a flowFrame object through 'fr' argument and return the stats as a named vector.} |
30 | 30 |
|
31 | 31 |
\item{inverse.transform}{logical flag . Whether inverse transform the data before computing the stats.} |
32 |
+ |
|
33 |
+\item{stats.fun.arg}{a list of arguments passed to `type` when 'type' is a function.} |
|
32 | 34 |
} |
33 | 35 |
\value{ |
34 | 36 |
a data.table that contains MFI values for each marker per column along with 'pop' column and 'sample' column (when used on a 'GatingSet') |