identifyAndPlay | R Documentation |
Internal soundgen function. NB: even built-in examples of identify() not working in R 4.4.1 (points not identified).
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$amMsFreq_median, msf$summary$amMsDep_median)
soundgen:::identifyAndPlay(msf$summary$amFreq_median, msf$summary$amDep_median,
audioFolder = '~/Downloads/temp',
to = 2,
plot = TRUE,
pch = 19)
# Method 2:
x = msf$summary$amMsFreq_median
y = msf$summary$amMsDep_median
plot(x, y)
soundgen:::identifyAndPlay(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.