Learn R Programming

cellHTS (version 1.42.0)

getMatrix: Create a matrix with replicate data in columns

Description

Given an array of raw or normalized intensities (xraw or xnorm) of a cellHTS object, creates a matrix with the data from the chosen channel.

Usage

getMatrix(y, channel=1, na.rm=FALSE)

Arguments

y
an array with four dimensions, such as the slot xraw or xnorm of a cellHTS object.
channel
a numeric value corresponding to the selected channel of y. By default, the first channel (that is, y[,,,1] is considered).
na.rm
Logical, indicated if the missing values should be omitted.

Value

A matrix with the same number of columns as the number of replicates (third dimension of y). If na.rm=FALSE (the default), the number of rows of the output matrix is identical to the product between the first two dimensions of y (nr wells x nr plates). If na.rm=TRUE, only the rows with no missing entries in all the replicates (columns) are given.

Details

Given as input an array y (e.g., the slot xraw, or xnorm of a cellHTS object) with dimensions nr wells x nr plates x nr replicates x nr channels, this function creates a matrix with the data for the chosen channel. Each replicate corresponds to a column of the output matrix. If na.rm is set to TRUE, only the positions with available values for all the replicates are given in the output matrix.

Examples

Run this code
    data(KcViabSmall)
    y <- getMatrix(KcViabSmall$xraw)

Run the code above in your browser using DataLab