This function selects and delete a section of data describing a time wave.
Original section and section after deletion can be plotted as oscillograms for comparison.
Usage
deletew(wave, f, from = NULL, to = NULL, choose = FALSE, plot = FALSE,
marks = TRUE, Sample = FALSE,...)
Arguments
wave
a vector, a matrix (first column),
an object of class ts, Sample (left channel),
or Wave (left channel).
f
sampling frequency of wave (in Hz).
Does not need to be specified if wave is an object of class ts,
Sample, or Wave<
from
start position (in s).
to
end position (in s).
choose
logical, if TRUE start (=from) and end (=to)
points can be graphically chosen with a cursor on the oscillogram.
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).
Sample
if TRUE and plot is FALSE
returns an object of class Sample
# deletion a 0.4 s section in a bird songdata(tico)
a<-deletew(tico,f=22050,from=0.5,to=0.9)
oscillo(a,22050)
# a direct way to see what has been cutdeletew(tico,f=22050,from=0.5,to=0.9,plot=TRUE)