This function reads and validates a CSV file containing presences and absences data for species occurrences. It checks if the file has the expected columns and formats.
read_presences_absences_csv(
file_path,
file_name = NULL,
show_modal = FALSE,
coords = c("decimalLongitude", "decimalLatitude"),
sep = "\t",
dec = "."
)
A data frame with the validated data if the file has the expected columns and formats, NULL otherwise.
The file path to the CSV file.
Optional. The name of the file. If not provided, the base name of the file path is used.
Optional. Logical. Whether to show a modal notification for warnings (use in Shiny). Default is FALSE.
Optional. Character vector of length 2 specifying the names of the columns containing the longitude and latitude coordinates. Default is c("decimalLongitude", "decimalLatitude").
Optional. The field separator character. Default is tab-separated.
Optional. The decimal point character. Default is ".".