CyData-subset {cydar} | R Documentation |
Methods to subset and combine objects of the CyData class.
## 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)
x |
A CyData object. |
i, j |
A vector of subscripts, indicating the rows and columns to be subsetted for |
... |
For |
drop |
A logical scalar, ignored. |
value |
A CyData object to replace the entries in the specified |
deparse.level, recursive |
Addition arguments, ignored. |
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.
A CyData object with different rows or columns, depending on whether subsetting or merging was performed.
Aaron Lun
example(CyData) # Mocking up an object. cyd[1:5,] cyd[,6:10] rbind(cyd, cyd) cbind(cyd, cyd)