identifyAndPlay | R Documentation |
Internal soundgen function
identifyAndPlay(
x,
y = NULL,
data = NULL,
audioFolder,
to = 5,
plot = FALSE,
pch = 19,
...
)
x , y |
plot coordinates |
data |
dataframe from which x & y are taken, also containing a column called "file" |
audioFolder |
path to audio files |
to |
play only the first ... s |
plot |
if TRUE, plots the index of clicked points |
pch |
symbol for marking clicked points |
... |
other arguments passed to |
A wrapper around identify()
intended to play the sound corresponding
to a clicked point.
## Not run:
msf = modulationSpectrum('~/Downloads/temp', plot = FALSE)
# Method 1: provide path to folder, leave data = NULL
plot(msf$summary$amFreq_median, msf$summary$amDep_median)
identifyPch(msf$summary$amFreq_median, msf$summary$amDep_median,
audioFolder = '~/Downloads/temp',
to = 2,
plot = TRUE,
pch = 19)
# Method 2:
plot(msf$summary$amFreq_median, msf$summary$amDep_median)
x = msf$summary$amFreq_median
y = msf$summary$amDep_median
identifyPch(x, y, data = msf$summary,
audioFolder = '~/Downloads/temp',
to = 2,
plot = FALSE,
pch = 8)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.