cutw {seewave} | R Documentation |
This function selects and cuts a section of data describing a time wave. Original and cut sections can be plotted as oscillograms for comparison.
cutw(wave, f, from = NULL, to = NULL, choose = FALSE, plot = FALSE, marks = TRUE, Sample = FALSE,...)
wave |
data describing a time wave
or a Sample object generated loading a wav file
with loadSample (package sound). |
f |
sampling frequency of wave (in Hz).
Does not need to be specified if wave is a Sample object. |
from |
start mark (in s). |
to |
end mark (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 |
... |
other oscillo graphical parameters. |
If plot
is TRUE
returns a two-frame plot with both
original and cut sections.
If plot
is FALSE
, a new wave is returned as a one-column matrix
or as a Sample
object if Sample
is TRUE
.
Jerome Sueur sueur@mnhn.fr
oscillo
, addsilw
,deletew
,
fadew
,mutew
,pastew
,revw
,
zapsilw
# a 0.4 s section in a bird song data(tico) a<-cutw(tico,f=22050,from=0.5,to=0.9) oscillo(a,22050) # a direct way to see what has been cut cutw(tico,f=22050,from=0.5,to=0.9,plot=TRUE)