getMatrix {cellHTS} | R Documentation

## Create a matrix with replicate data in columns

### Description

Given an array of raw or normalized intensities (`x$raw` or `x$xnorm`), 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 `y=x$xraw` or `y=x$xnorm`, where `x` is 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.

### 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.

### 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.

### Author(s)

Ligia Brás ligia@ebi.ac.uk

### Examples

        data(KcViabSmall)
        y <- getMatrix(KcViabSmall$xraw)

[Package cellHTS version 1.6.0 Index]