View source: R/read_validate_files.R
read_presences_absences_csv | R Documentation |
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 = "."
)
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. |
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 ".". |
A data frame with the validated data if the file has the expected columns and formats, NULL otherwise.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.