stat_position: Compute the positions of the population statistics based on...

Description Usage Arguments Value Examples

View source: R/stat_position.R

Description

It is usually not called directly by user but mainly used by compute_stats function (which is called by ggcyto add method when geom_states layer is added).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
stat_position(gate, ...)

## S3 method for class 'filter'
stat_position(
  gate,
  negated = FALSE,
  adjust = 0.5,
  abs = FALSE,
  data_range = NULL,
  limits = NULL,
  ...
)

Arguments

gate

a flowCore filter

...

other arguments

negated

logical indicating whether position needs to be moved to negative side of gate

adjust

adjust the position of the centroid. This can be a length-2 vector with an adjustment in each dimension.

abs

logical

data_range

a two-row data.frame representing the actual data range. Each column is a a range for a specific channel. First row is min, Second row is max.

limits

used to fix the gate range

Value

a data.table of gate centroid coordinates

Examples

1
2
3
4
5
data(GvHD)
fs <- GvHD[1:4]
rect.g <- rectangleGate(list("FSC-H" =  c(300,500), "SSC-H" = c(50,200)))
rect.gates <- sapply(sampleNames(fs), function(sn)rect.g)
stat_position(rect.gates)

ggcyto documentation built on Nov. 8, 2020, 5:30 p.m.