View source: R/createWavList.R
| createWavList | R Documentation | 
This function reads in portions of a set of synchronized .wav files. It is intended to be used to load sounds of interest for localization.
createWavList( paths, names, from, to, buffer, adjustments, channels, index = "unknown" )
paths | 
 Character vector. File paths to the set of .wav files to be read.  | 
names | 
 Character vector. Station names for the files. Must have the same length and
the names must occur in the same order as the   | 
from | 
 Numeric. Start time, in seconds, of the sound of interest, relative to the start of the file.  | 
to | 
 Numeric. End time, in seconds, of the sound of interest, relative to the start of the file.  | 
buffer | 
 Numeric. Amount of blank space around each sound of interest to be read.  | 
adjustments | 
 Numeric vector. Amount, in seconds, to adjust the start times of recordings,
if not already synchronized. Vector must be of the same length as the
  | 
channels | 
 Numeric vector. The channel to be read from each .wav file. Left = 1, Right = 2. If missing, default is left channel (channel 1) for all recordings.  | 
index | 
 Numeric. If using this function within a loop, pass the index i to the function, which can help with troubleshooting if an error occurs.  | 
Named list of Wave objects.
    #list example mp3 files.
    wavs <- list.files(system.file('extdata', package = 'locaR'),
                       pattern = 'mp3$', full.names = TRUE)
    #get names of mp3 locations.
    nms <- substr(basename(wavs), 1, 4)
    #create wave list.
    wl <- createWavList(paths = wavs, names = nms, from = 1, to = 2, buffer = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.