combineAndSubset-methods {ASICS} | R Documentation

## Combine or subset functions

### Description

Methods available to combine multiple objects or to extract a subset of one object in ASICS package.

### Usage

    ## S4 method for signature 'Spectra,ANY,ANY,ANY'
    x[i]

    ## S4 method for signature 'Spectra'
    c(x, ...)

    ## S4 method for signature 'ASICSResults,ANY,ANY,ANY'
    x[i]

    ## S4 method for signature 'ASICSResults'
    c(x, ...)

    ## S4 method for signature 'PureLibrary,ANY,ANY,ANY'
    x[i]

    ## S4 method for signature 'PureLibrary'
    c(x, ...)

### Arguments

`x` | An object of class Spectra, PureLibrary or ASICSResults.
`i` | vector of indices specifying which elements to extract
`...` | objects to be concatenated

### Value

A Spectra object containing a part of the original object or combining other Spectra objects

### Examples

    # Import data and create object
    current_path <- file.path(system.file("extdata", package = "ASICS"),
                              "spectra_example.txt")
    spectra_data <- read.table(current_path, header = TRUE, row.names = 1)
    spectra_obj <- createSpectra(spectra_data)

    # Extract the first sample
    spectra_obj[1]

[Package ASICS version 2.6.1 Index]