An S4 Class to Represent a Set of Peaks
Slots
hash
A
character
string giving the 32-byte MD5 hash of the imported spectrum file.noise_method
A
character
string specifying the method used for peak detection.noise_threshold
A length one
numeric
vector giving the noise threshold.window
A length one
numeric
vector giving the half-window size.channel
A
integer
vector giving the channel number. Numeric values are coerced to integer as byas.integer()
(and hence truncated towards zero).energy_observed
A
numeric
vector giving the observed gamma ray energy (in keV).energy_expected
A
numeric
vector giving the expected gamma ray energy (in keV).
Access
In the code snippets below, x
is a PeakPosition
object.
get_hash(x)
Get the MD5 hash of the raw data file.
get_channels(x)
Get the channels of
x
.get_energy(x)
,set_energy(x) <- value
Retrieves or sets the energy scale of
x
according tovalue
.
Coerce
In the code snippets below, x
is a PeakPosition
object.
as.matrix(x)
Coerces
x
to amatrix
.as.data.frame(x)
Coerces
x
to adata.frame
.
Subset
In the code snippets below, x
is a PeakPosition
object.
x[[i]]
Extracts information from a slot selected by subscript
i
.i
is acharacter
vector of length one and will be matched to the name of the slots.
See also
Other class:
Baseline-class
,
CalibrationCurve-class
,
GammaSpectra-class
,
GammaSpectrum-class
,
coerce()