CyData-subset {cydar}R Documentation

Subsetting and combining CyData

Description

Methods to subset and combine objects of the CyData class.

Usage

## S4 method for signature 'CyData,ANY,ANY'
x[i, j, ..., drop=TRUE]
## S4 replacement method for signature 'CyData,ANY,ANY,CyData'
x[i, j] <- value
## S4 method for signature 'CyData'
subset(x, i, j)

## S4 method for signature 'CyData'
rbind(..., deparse.level=1)
## S4 method for signature 'CyData'
c(x, ..., recursive=FALSE)
## S4 method for signature 'CyData'
cbind(..., deparse.level=1)

Arguments

x

A CyData object.

i, j

A vector of subscripts, indicating the rows and columns to be subsetted for i and j, respectively. Rows correspond to cell-groups while columns correspond to samples.

...

For cbind, ... contains CyData objects to be combined column-wise. For rbind and c, ... contains CyData objects to be combined row-wise. For c, any objects are additional to that already specified in x. For other methods, this argument is ignored.

drop

A logical scalar, ignored.

value

A CyData object to replace the entries in the specified i and j.

deparse.level, recursive

Addition arguments, ignored.

Details

Subsetting of CyData objects consider groups of cells (e.g., clusters, hyperspheres) as the rows, and samples as the columns. Only the rows of intensities are affected during row-wise subsetting. Marker and cell information in markerData, cellData and cellIntensities is not modified.

A similar principle applies when combining different CyData objects, i.e., rows are groups of cells and columns are samples. Values of markerData and cellIntensities should be identical in the objects to be combined. Furthermore, for cbind, values of intensities should also be identical. Note that c is a synonym for rbind.

When replacing entries with [<-, markerData, cellData and cellIntensities should be identical in x and value. Column replacement also requires intensities and cellAssignments to be the same. Simultaneous row and column replacement is not allowed as this will introduce inconsistencies into the sample ID annotation.

Value

A CyData object with different rows or columns, depending on whether subsetting or merging was performed.

Author(s)

Aaron Lun

Examples

example(CyData) # Mocking up an object.

cyd[1:5,]
cyd[,6:10]
rbind(cyd, cyd)
cbind(cyd, cyd)

[Package cydar version 1.4.0 Index]