cutw {seewave}R Documentation

Cut a section of a time wave

Description

This function selects and cuts a section of data describing a time wave. Original and cut sections can be plotted as oscillograms for comparison.

Usage

cutw(wave, f, from, to, plot = FALSE, marks = TRUE, ...)

Arguments

wave data describing a time wave.
f sampling frequency of wave.
from start mark (in s).
to end mark (in s).
plot logical, if TRUE returns an oscillographic plot of original and cut sections (by default FALSE).
marks logical, if TRUE shows the start and end mark on the plot (by default TRUE).
... other oscillo graphical parameters.

Details

If plot is TRUE returns a two-frame plot with both original and cut sections.

Value

If plot is FALSE, cutw returns a one-column matrix describing the cut wave with the same sampling frequency as original data.

Author(s)

Jérôme Sueur jerome.sueur@ibaic.u-psud.fr

See Also

oscillo, pastew, timer.

Examples

# a 0.4 s section in a bird song
data(tico)
a<-cutw(tico,f=22050,from=0.5,to=0.9)
oscillo(a,8000,k=1,j=1)
# a direct way to see what has been cut
cutw(tico,f=22050,from=0.5,to=0.9,plot=TRUE)

[Package seewave version 1.0 Index]