Skip to contents

Reads and combines multiple BirdNET output .csv or .txt files from a specified directory (including subdirectories) into a single data frame.

Usage

birdnet_combine(path)

Arguments

path

Character string. Path to a directory containing BirdNET output files.

Value

A data frame combining all readable BirdNET .csv or .txt files found in the directory. The column structure depends on the input files and is not standardized by this function.

Details

Files named "analysis_params" or "CombinedTable" are automatically excluded. Files that are empty or cannot be read are skipped. A summary of how many files were successfully read and which files (if any) caused errors is printed at the end.

This function is useful for aggregating large batches of BirdNET results without requiring consistent formatting. All subdirectories are searched recursively. Files are read using readr::read_csv(), and empty files are silently ignored.

If no valid files are found, or if all files are excluded or cause read errors, the function aborts with an informative message.

Examples

if (FALSE) { # \dontrun{
# Combine all BirdNET output files in a directory and its subfolders
data <- birdnet_combine("path/to/BirdNET/output")

# View a few rows of the result
head(data)
} # }