PPE-operate {PhosR} | R Documentation

## PhosphoExperiment object subset, combine methods

### Description

These are methods for combining or subsetting for `PhosphoExperiment` object. This provides some convenience for users.

### Usage

    ## S4 method for signature 'PhosphoExperiment,ANY,ANY,ANY'
    x[i, j, drop = TRUE]

    ## S4 replacement method for signature 'PhosphoExperiment,ANY,ANY,ANY'
    x[i, j, ...] <- value

    ## S4 method for signature 'PhosphoExperiment'
    rbind(..., deparse.level = 1)

    ## S4 method for signature 'PhosphoExperiment'
    cbind(..., deparse.level = 1)

### Arguments

`x` | A `PhosphoExperiment` object
`i` | For `[,PhosphoExperiment`, `[,PhosphoExperiment<-, i, j` are subscripts that can act to subset the rows of x
`j` | For `[,PhosphoExperiment`, `[,PhosphoExperiment<-, i, j` are subscripts that can act to subset the columns of x
`drop` | A `logical(1)`, ignored by these methods
`...` | In `cbind` or `rbind`, a `PhosphoExperiment` objects
`value` | An object of a class specified in the S4 method signature.
`deparse.level` | See `?base::cbind` for a description of this argument.

### Available methods

In the following code snippets, `ppe1` and `ppe2` is a `PhosphoExperiment` object with matching `colData`. `ppe3` and `ppe4` is a `PhosphoExperiment` object with matching `rowData`.

`rbind(ppe1, ppe2)`:

  Combine row-wise

`cbind(ppe3, ppe4)`:

  Combine column-wise

### Author(s)

Taiyun Kim

### See Also

method `rbind`, `cbind` from SummarizedExperiment object.

### Examples

    example(PhosphoExperiment, echo = FALSE)

    n = ncol(phosData)
    ppe1 = phosData[,seq(round(n/2))]
    ppe2 = phosData[,-seq(round(n/2))]

    ppe = cbind(ppe1, ppe2)
    identical(ppe, phosData)

    ppe[,seq(round(n/2))] = ppe1
    identical(ppe, phosData)

    p = nrow(phosData)
    ppe1 = phosData[seq(round(p/2)),]
    ppe2 = phosData[-seq(round(p/2)),]

    ppe = rbind(ppe1, ppe2)
    identical(ppe, phosData)

    ppe[seq(round(p/2)),] = ppe1
    identical(ppe, phosData)

[Package PhosR version 1.2.0 Index]