read_presences_absences_csv {glossa} | R Documentation |
Read and validate presences/absences CSV file
Description
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.
Usage
read_presences_absences_csv(
file_path,
file_name = NULL,
show_modal = FALSE,
timestamp_mapping = NULL,
coords = c("decimalLongitude", "decimalLatitude"),
sep = "\t",
dec = "."
)
Arguments
file_path |
The file path to the CSV file. |
file_name |
Optional. The name of the file. If not provided, the base name of the file path is used. |
show_modal |
Optional. Logical. Whether to show a modal notification for warnings (use in Shiny). Default is FALSE. |
timestamp_mapping |
Optional. A vector with the timestamp mapping of the environmental layers. |
coords |
Optional. Character vector of length 2 specifying the names of the columns containing the longitude and latitude coordinates. Default is c("decimalLongitude", "decimalLatitude"). |
sep |
Optional. The field separator character. Default is tab-separated. |
dec |
Optional. The decimal point character. Default is ".". |
Value
A data frame with the validated data if the file has the expected columns and formats, NULL otherwise.