combineAndSubset-methods: Combine or subset functions

Description Usage Arguments Value Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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

1
2
3
4
5
6
7
8
# 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]

ASICS documentation built on Nov. 8, 2020, 8:19 p.m.