This function generates and saves spectrogram images for various summary statistics (mean, max, min, median, mode) for each recording in the input data frame. Spectrograms are created for specific wave files as indicated in the data, with options to normalize and remove DC offset.
Usage
summary_spectrograms(
summary_df,
parent_dir = NULL,
output_dir = "summary_spectros_se2",
rmdcoff = TRUE,
norm = FALSE
)
Arguments
- summary_df
A data frame containing summary statistics of recordings. It should include columns
sensor_id
,channel
,index
, and columns namedclosest_to_<stat>
for categoriesmean
,max
,min
,median
, andmode
, each referring to the closest wave file for each statistic.- parent_dir
A character string specifying the parent directory containing the
.wav
files. Defaults toNULL
, which setsparent_dir
to the current working directory.- output_dir
A character string specifying the directory to save generated spectrogram images. aults to
"summary_spectrograms_se2"
.- rmdcoff
A logical value indicating whether to remove the DC offset from wave files before generating spectrograms. Defaults to
TRUE
.- norm
A logical value indicating whether to normalize the spectrogram. Defaults to
FALSE
.