
Convert BirdNET prediction results to a data frame
Source:R/predict.R
as.data.frame.birdnet_prediction.RdConvert predictions from a geo or acoustic model to a data frame.
Usage
# S3 method for class 'birdnet_prediction'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for class 'birdnet_prediction_geo'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)Arguments
- x
A BirdNET prediction object (as returned by
birdnet_predict()).- row.names
NULLor a character vector giving the row names for the data frame. Not used.- optional
logical. Not used.
- ...
Additional arguments (ignored).
Examples
if (FALSE) { # \dontrun{
# Load a BirdNET acoustic model
model <- birdnet_load()
# Predict species from audio files
audio_file <- system.file("extdata", "soundscape.mp3", package = "birdnetR")
predictions <- birdnet_predict(model, files = audio_file)
# Convert predictions to a data frame
as.data.frame(predictions)
} # }