Skip to contents

Split

Usage

signal_split(object, ...)

# S4 method for class 'GammaSpectrum'
signal_split(object, groups)

Arguments

object

A GammaSpectrum object.

...

Currently not used.

groups

A a factor in the sense that as.factor(groups) defines the grouping (see split).

Value

A GammaSpectra object.

See also

Author

N. Frerebeau

Examples

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

## Plot spectrum
plot(spc)


## Slice
sliced <- signal_slice(spc)
plot(sliced)


sliced <- signal_slice(spc, -c(1:35))
plot(sliced)


sliced <- signal_slice(sliced, 450:550)
plot(sliced)


## Split
g <- rep(c("A", "B", "C"), c(250, 500, 274))
splited <- signal_split(spc, g)
plot(splited, facet = TRUE)