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

# S4 method for PhosphoExperiment,ANY,ANY,ANY
[(x, i, j, drop = TRUE)

# S4 method for PhosphoExperiment,ANY,ANY,ANY
[(x, i, j, ...) <- value

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

# S4 method for 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

See also

method rbind, cbind from SummarizedExperiment object.

Author

Taiyun Kim

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)
#> [1] TRUE

ppe[,seq(round(n/2))] = ppe1
identical(ppe, phosData)
#> [1] TRUE

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

ppe = rbind(ppe1, ppe2)
identical(ppe, phosData)
#> [1] FALSE

ppe[seq(round(p/2)),] = ppe1
identical(ppe, phosData)
#> [1] FALSE