flowDens-class {flowClust} | R Documentation

## Grid of Density Values for the Fitted t Mixture Model with Box-Cox Transformation

### Description

This method constructs the `flowDens` object which is used to generate a contour or image plot.

### Usage

    ## S4 method for signature 'flowClust'
    density(x, data = NULL, subset = c(1, 2),
      include = 1:(x@K), npoints = c(100, 100), from = NULL, to = NULL)

    ## S4 method for signature 'flowClustList'
    density(x, data = NULL, subset = c(1, 2),
      include = 1:(x@K), npoints = c(100, 100), from = NULL, to = NULL)

### Arguments

`x` | Object returned from `flowClust` or from running `filter` on a `flowFrame` object.
`data` | A matrix, data frame of observations, or object of class `flowFrame`. This is the object on which `flowClust` or `filter` was performed. If this argument is not specified, the grid square upon which densities will be computed must be provided (through arguments `from` and `to`).
`subset` | A numeric vector of length two indicating which two variables are selected for the scatterplot. Alternatively, a character vector containing the names of the two variables is allowed if `x@varNames` is not `NULL`.
`include` | A numeric vector specifying which clusters are included to compute the density values. By default, all clusters are included.
`npoints` | A numeric vector of size two specifying the number of grid points in x (horizontal) and y (vertical) directions respectively.
`from` | A numeric vector of size two specifying the coordinates of the lower left point of the grid square. Note that, if this (and `to`) is not specified, `data` must be provided such that the range in the two variables (dimensions) selected will be used to define the grid square.
`to` | A numeric vector of size two specifying the co-ordinates of the upper right point of the grid square.

### Details

The `flowDens` object returned is to be passed to the `plot` method for generating a contour or image plot.

### Value

An object of class `flowDens` containing the following slots is constructed:

`dx` | A numeric vector of length `npoints[1]`; the x-coordinates of the grid points.
`dy` | A numeric vector of length `npoints[2]`; the y-coordinates of the grid points.
`value` | A matrix of size `npoints[1]` x `npoints[2]`; the density values at the grid points.

### Author(s)

Raphael Gottardo <raph@stat.ubc.ca>, Kenneth Lo <c.lo@stat.ubc.ca>

### See Also

`plot`, `flowClust`

[Package flowClust version 3.26.0 Index]