
Add datetime-related columns from BirdNET output filenames
Source:R/utils_column_editing.R
birdnet_add_datetime.Rd
Extracts and parses datetime information from filenames in the file path column
(automatically detected), then adds several useful time-related columns
(e.g., date
, year
, month
, hour
) to the input data frame.
Value
A data frame with additional columns:
- datetime
POSIXct datetime parsed from the filename.
- date
Date portion of the datetime.
- year, month, mday, yday, hour, minute
Individual datetime components.
Details
The function uses birdnet_detect_columns
to find the column
containing file paths based on common name patterns (e.g., "file", "path").
Examples
if (FALSE) { # \dontrun{
combined_data <- birdnet_combine("path/to/BirdNET/output")
data_with_time <- birdnet_add_datetime(combined_data)
} # }