Description Usage Arguments Details Value Author(s) See Also Examples
Methods to subset or combine ContactMatrix objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ### Subsetting
## S4 method for signature 'ContactMatrix,ANY,ANY'
x[i, j, ..., drop=TRUE]
## S4 replacement method for signature 'ContactMatrix,ANY,ANY,ContactMatrix'
x[i, j] <- value
## S4 method for signature 'ContactMatrix'
subset(x, i, j)
### Combining
## S4 method for signature 'ContactMatrix'
cbind(..., deparse.level=1)
## S4 method for signature 'ContactMatrix'
rbind(..., deparse.level=1)
|
x |
A ContactMatrix object. |
i, j |
A vector of subscripts, indicating the rows and columns to be subsetted for |
... |
For |
drop |
A logical scalar, ignored by |
value |
A ContactMatrix object with dimensions equal to the length of the two subscripts (or the corresponding dimensions of |
deparse.level |
An integer scalar; see |
Subsetting of ContactMatrix objects behaves like that for standard matrices.
Rows and columns can be selected and rearranged, with concomitant changes to the anchor1 and anchor2 slots.
All subsetting operations will return an ContactMatrix with the specified rows and columns.
However, note that the value of regions will not be modified by subsetting.
cbind will combines objects with the same rows but different columns.
Errors will occur if the row regions are not identical between objects (i.e., must have same values in the slots for regions and anchor1).
Conversely, rbind will combines objects with the same columns but different rows.
Again, errors will occur if the columns are not identical (i.e., must have same values in the slots for regions and anchor2).
If subsetted anchors are required, see ?"interaction-subset" for why subsetting should be done before calling the anchors method.
A subsetted or combined ContactMatrix object.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.