Last data update: 2014.03.03

R: Tests for MassSpectrum or MassPeaks object.
isMassSpectrumR Documentation

Tests for MassSpectrum or MassPeaks object.

Description

These functions test for a MassSpectrum or MassPeaks object.

Usage

isMassSpectrum(x)

isMassPeaks(x)

Arguments

x

object to be tested.

Value

Returns TRUE or FALSE depending on whether its argument is an MassSpectrum or MassPeaks object.

Author(s)

Sebastian Gibb mail@sebastiangibb.de

See Also

MassPeaks, MassSpectrum, AbstractMassObject

Website: http://strimmerlab.org/software/maldiquant/

Examples

## load package
library("MALDIquant")

## create a MassPeaks object
peaks <- createMassPeaks(mass=1:100, intensity=1:100,
                         metaData=list(name="example 1"))

## test
isMassPeaks(peaks)      # returns TRUE
isMassSpectrum(peaks)   # returns FALSE
isMassPeaks(double())   # returns FALSE

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MALDIquant)

This is MALDIquant version 1.15
Quantitative Analysis of Mass Spectrometry Data
 See '?MALDIquant' for more information about this package.

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MALDIquant/isMassObject-functions.Rd_%03d_medium.png", width=480, height=480)
> ### Name: isMassSpectrum
> ### Title: Tests for MassSpectrum or MassPeaks object.
> ### Aliases: isMassSpectrum isMassPeaks
> ### Keywords: methods
> 
> ### ** Examples
> 
> ## load package
> library("MALDIquant")
> 
> ## create a MassPeaks object
> peaks <- createMassPeaks(mass=1:100, intensity=1:100,
+                          metaData=list(name="example 1"))
> 
> ## test
> isMassPeaks(peaks)      # returns TRUE
[1] TRUE
> isMassSpectrum(peaks)   # returns FALSE
[1] FALSE
> isMassPeaks(double())   # returns FALSE
[1] FALSE
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>