snip: Snip/Zoom

Description Usage Arguments Details Value Author(s) Examples

View source: R/snip.R

Description

Select a subsection of a sound or spectrogram object.

Usage

1
snip  (object, show = TRUE)

Arguments

object

A 'sound' or 'spectrogram' object to be truncated.

show

If TRUE, the selected subsection is displayed, resulting in zoom functionality.

Details

The input object is plotted and the user must click on two points on the plot. If show = TRUE, this function allows the user to zoom in on a subsection of the object. If the output is assigned to a variable, a new object is created and returned that contains only the data in between the two designated points.

Value

A 'sound' or 'spectrogram' object which interacts with several functions included in this package.

Author(s)

Santiago Barreda <[email protected]>

Examples

1
2
3
4
5
6
7
data (sound)
## the example below is commented because examples cannot 
## require user interaction. simply uncomment the lines below
## and select two points on the plot. 
# clipped = snipsound (sound)
# spectrogram (clipped)
# spectralslice (clipped)

phonTools documentation built on May 29, 2017, 9 a.m.