removeSpots {arrayMagic} | R Documentation

## Remove specified spots from objects

### Description

All elements matching the strings in `spotsToBeRemoved` are taken out of the object `arrayDataObject` and the corresponding ones out of the object `exprSetRGObject` as well, if supplied.

### Usage

    removeSpots(arrayDataObject, exprSetRGObject=NULL, spotsToBeRemoved=NULL, spotIdentifier="Name")

### Arguments

`arrayDataObject` | object of type `arrayData`; required; default: missing
`exprSetRGObject` | object of type `exprSetRG`; optional; default: `NULL`
`spotIdentifier` | character string, i.e. name of the column of `getSpotAttr(arrayDataObject)` used for matching; default "Name"
`spotsToBeRemoved` | vector of character strings; default: `NULL`

### Details

### Value

A named list containing an object of type `arrayData` labelled "arrayDataObject", an object of type `exprSetRG` labelled "exprSetRGObject" and an integer specifying the number of removed items labelled "nrOfRemovedItems".

### Author(s)

Andreas Buness <a.buness@dkfz.de>

### See Also

`arrayData-class`, `exprSetRG-class`

### Examples

      intensities <- array(data=runif(600),dim=c(100,2,3))
      dimnames(intensities) <- list(NULL, c("green","red"), NULL)
      arrayDataObject <- new("arrayData", intensities=intensities, spotAttr=data.frame(Name=I(rep(c("x","y","Blank","Blank","z"),20))), hybAttrList=NULL)
      res <- removeSpots(arrayDataObject, spotsToBeRemoved=c("x","z"))
      stopifnot( dim(getIntensities(res[["arrayDataObject"]]))[1] == 3*20 )

[Package arrayMagic version 1.5.0 Index]