read_labels {birdnetR} | R Documentation |
Read species labels from a file
Description
This is a convenience function to read species labels from a file.
Usage
read_labels(species_file)
Arguments
species_file |
Path to species file. |
Value
A vector with class labels e.g. c("Cyanocitta cristata_Blue Jay", "Zenaida macroura_Mourning Dove")
See Also
available_languages()
labels_path()
Examples
# Read a custom species file
read_labels(system.file("extdata", "species_list.txt", package = "birdnetR"))
# To access all class labels that are supported in your language,
# you can read in the respective label file
## Not run:
model <- birdnet_model_tflite(version = "v2.4", language = "en_us")
labels_path <- labels_path(model, "fr")
species_list <- read_labels(labels_path)
head(species_list)
## End(Not run)
[Package birdnetR version 0.3.2 Index]