fortify.flowSet: Convert a flowFrame/flowSet/GatingSet to a ggplot-compatible...

View source: R/fortify.R

fortify.cytoframeR Documentation

Convert a flowFrame/flowSet/GatingSet to a ggplot-compatible data.table

Description

It extracts events matrices and appends the pData to it so that ggplot can use the pData for facetting.

Usage

## S3 method for class 'cytoframe'
fortify(model, ...)

## S3 method for class 'flowFrame'
fortify(model, data, ...)

## S3 method for class 'flowSet'
fortify(model, data, ...)

## S3 method for class 'cytoset'
fortify(model, ...)

## S3 method for class 'ncdfFlowList'
fortify(model, ...)

## S3 method for class 'GatingSetList'
fortify(model, ...)

## S3 method for class 'GatingSet'
fortify(model, ...)

Arguments

model

flowFrame, flowSet or GatingSet

...

not used.

data

not used.

Value

data.table

data.table

data.table

Examples

dataDir <- system.file("extdata",package="flowWorkspaceData")
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))

attr(gs, "subset") <- "CD4" #must attach subset information to GatingSet object before foritfying it
fortify(gs)

fs <- gs_pop_get_data(gs, "CD8")
fortify(fs)#fs is a flowSet/ncdfFlowSet

fr <- fs[[1]]
fortify(fr)#fr is a flowFrame

RGLab/ggcyto documentation built on March 3, 2024, 6:23 p.m.