Learn R Programming

beadarray (version 2.22.2)

insertBeadData: Add, modify or remove data in a beadLevelData object

Description

Add, modify or remove data in a beadLevelData object.

Usage

insertBeadData(BLData, array = 1, what, data) removeBeadData(BLData, array = 1, what)

Arguments

BLData
An object of class beadLevelData-class.
array
Positive integer specifying what section should be modified.
what
Name of the data that is being modified. If `what' doesn't exist then a new entry is created using the name specified in this argument.
data
A numeric vector to be stored, the same length as the number of beads in the section specified by the array argument.

Value

Returns an object of class beadLevelData-class.

Details

These functions allow the beadData slot of the beadLevelData-class object to be modified for a given array.

Examples

Run this code

      if(require(beadarrayExampleData)){

	data(exampleBLData)
	logIntensity <- log2(getBeadData(exampleBLData, what = "Grn", array = 1))

	## This will add a new entry called "LogGrn" to BLData
	exampleBLData <- insertBeadData(exampleBLData, array = 1, what = "LogGrn", data = logIntensity)
	head(exampleBLData[[1]])

	## Supplying an existing entry to "what" will overwrite the current data
    exampleBLData <- insertBeadData(exampleBLData, array = 1, what = "Grn", data = logIntensity)
	head(exampleBLData[[1]])

    }

Run the code above in your browser using DataLab