normalize-methods {Cardinal} | R Documentation

## Normalize an Imaging Dataset

### Description

Apply normalization to a mass spectrometry imaging dataset.

### Usage

    ## S4 method for signature 'MSImageSet'
    normalize(object, method = "tic",
    	...,
    	pixel = pixels(object),
    	plot = FALSE)

    ## TIC normalization
    normalize.tic(x, tic=length(x), ...)

### Arguments

`object` | An object of class `MSImageSet`.
`method` | The normalization method to use.
`pixel` | The pixels to normalize. If less than the extent of the dataset, this will result in a subset of the data being processed.
`plot` | Plot the mass spectrum for each pixel while it is being processed?
`...` | Additional arguments passed to the normalization method.
`x` | The mass spectrum to be normalized.
`tic` | The value to which to normalize the total ion current.

### Details

Normalization is usually performed using the provided functions, but a user-created function can also be passed to `method`. In this case it should take the following arguments:

- `x`: A `numeric` vector of intensities.

- `...`: Additional arguments.

A user-created function should return a `numeric` vector of the same length.

Internally, `pixelApply` is used to apply the normalization. See its documentation page for more details on additional objects available to the environment installed to the normalization function.

### Value

An object of class `MSImageSet` with the normalized spectra.

### Author(s)

Kylie A. Bemis

### See Also

`MSImageSet`, `pixelApply`

### Examples

    data <- generateImage(as="MSImageSet")
    normalize(data, method="tic", plot=interactive())

[Package Cardinal version 1.12.1 Index]