msiDataset: Constructor for msi.dataset-class objects.

View source: R/construct_funcs.R

msiDatasetR Documentation

Constructor for msi.dataset-class objects.

Description

msiDataset returns a msi.dataset-class object. It contains information about the matched peaks intensities, the geometrical dimensions of the mass spectral image, and the common m/z values.

Usage

msiDataset(values, mz, rsize, csize, verbose = TRUE)

Arguments

values

numeric matrix containing the peaks intensities. Rows represent pixels and columns represent peaks.

mz

array of m/z peaks values.

rsize

geometric shape (number of rows) of image.

csize

geometric shape (number of columns) of image.

verbose

boolean (default = TRUE). Additional output.

Details

Function used to construct the main object msi.dataset-class. This object contains all the information about peaks intensities (intensity matrix), the geometrical shape of the image (rows, columns), and the vector of the common m/z values, generated during the peak matching process.

Value

msi.dataset-class object.

Author(s)

Paolo Inglese p.inglese14@imperial.ac.uk

Examples

## Load package
library("SPUTNIK")

## Create the msi.dataset-class object
sz <- c(5, 4)
numIons <- 20
x <- matrix(rnorm(prod(sz) * numIons), prod(sz), numIons)
mz <- sort(sample(100, numIons))
msiX <- msiDataset(x, mz, sz[1], sz[2])

paoloinglese/SPUTNIK documentation built on April 18, 2024, 8:56 p.m.