pGate: Create Arbitrary Gate from Lattice Panel

Description Usage Arguments Details Value

View source: R/pGate.R

Description

Interact with lattice flow plot to define a gate

Usage

1
2
3
4
5
6
7
pGate(
  type = c("arbitrary", "parallel", "convex", "ellipse"),
  vertical = TRUE,
  horizontal = FALSE,
  filterId = NULL,
  adjust.ellipse.distance = sqrt(2)
)

Arguments

type

Type of gate as a character string (see details)

vertical, horizontal

Logical values to impose vertical or horizontal boundaries for type = "parallel" gate (default values of vertical = TRUE and horizontal = FALSE)

filterId

A character vector to identify this filter.

adjust.ellipse.distance

Fudge factor for ellipsoidGate (default of sqrt(2))

Details

This function is called after an xyplot of flow data in order to define a gate. The user will select a panel that will be redrawn and used to select points that define the gate for the data in the remaining panels ('flowSet'). The type of gate is specific by the argument type and can be one of the following character strings. Only the first letter is required since partial matching is used to assign the value.

"arbitrary" The selected points will define the vertices of an arbitrary polygon.
"parallel" A parallelogram specified by 3 points with optional vertical and horizontal constraints specified by vertical and horizontal.
"convex" The convex hull of the selected points.
"ellipse" The ellipsoid hull (minimal ellipse) encompassing the selected points.

The implementation of ellipsoidGate does not seem to honor the covariance parameter, so the distance parameter has been arbitrarily adjusted by the square root of 2 to make up for this quirk.

Value

A polygonGate or ellipsoidGate object is returned of the same dimensions as the active lattice graph.


ornelles/flowExtra documentation built on March 1, 2020, 9:33 a.m.