makeAccessor {rawrr} | R Documentation

## Make accessor function for key value pair returned by RawFileReader

### Description

Make accessor function for key value pair returned by RawFileReader

### Usage

    makeAccessor(key, returnType = "integer")

### Arguments

`key` | An object name found in instance of class `rawrrSpectrum`
`returnType` | The type used for casting of values

### Details

This function factory creates accessor functions for class `rawrrSpectrum`.

### Value

An accessor function

### Author(s)

Tobias Kockmann, 2020

### Examples

    S <- readSpectrum(rawfile = sampleFilePath(), 1:10)
    maxIonTime <- makeAccessor(key = "Max. Ion Time (ms):", returnType = "double")
    maxIonTime(S[[1]])

[Package rawrr version 1.0.3 Index]