getShapeMSI-msi.dataset-method: Returns the geometrical shape of MSI dataset

getShapeMSI,msi.dataset-methodR Documentation

Returns the geometrical shape of MSI dataset

Description

Returns the geometrical shape of MSI dataset

Usage

## S4 method for signature 'msi.dataset'
getShapeMSI(object)

Arguments

object

msi.dataset-class object.

Value

number of rows ans number of columns of the MS image.

Examples

## Load package
library("SPUTNIK")

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

## Get m/z vector
mz <- getMZ(msiX)

## Get intensity matrix
X <- getIntensityMat(msiX)

## Get image size
sz <- getShapeMSI(msiX)

paoloinglese/SPUTNIK documentation built on March 19, 2024, 1:06 a.m.