coerce: Coerce

coerceR Documentation

Coerce

Description

Coerce

Usage

as_spectra(x)

as_peaks(x)

## S4 method for signature 'GammaSpectrum'
as.matrix(x, ...)

## S4 method for signature 'PeakPosition'
as.matrix(x, ...)

## S4 method for signature 'GammaSpectrum'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S4 method for signature 'PeakPosition'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S4 method for signature 'PeakPosition'
as.list(x, ...)

## S4 method for signature 'GammaSpectrum'
as_spectra(x)

## S4 method for signature 'list'
as_spectra(x)

## S4 method for signature 'list'
as_peaks(x)

Arguments

x

An object to be coerced.

...

Currently not used.

row.names, optional

Currently not used.

Value

A coerced object.

Author(s)

N. Frerebeau

See Also

Other class: Baseline-class, CalibrationCurve-class, GammaSpectra-class, GammaSpectrum-class, PeakPosition-class

Examples

## Import a Canberra CNF file
spc_file <- system.file("extdata/LaBr.CNF", package = "gamma")
spc <- read(spc_file)

## Coerce
mtx <- as.matrix(spc)
df <- as.data.frame(spc)
head(df)

crp2a/gamma documentation built on Jan. 15, 2025, 6:38 a.m.