View source: R/chek_reptiledb_status.R
check_data_update | R Documentation |
This function checks if the local reptile database data is up-to-date by comparing the date extracted from the local dataset name with the date from the latest available file on The Reptile Database website.
check_data_update(silent = FALSE, check_connection = TRUE)
silent |
Logical. If TRUE, suppresses messages and only returns results. Default is FALSE. |
check_connection |
Logical. If TRUE, checks internet connection before attempting to access online data. Default is TRUE. |
A list containing the following elements:
Logical. TRUE if an update is needed, FALSE otherwise
List. Information about the local dataset
List. Information about the remote dataset
Character. Status message describing the comparison result
Character. Recommendation for user action
Character. Date of local data in YYYY-MM-DD format
Character. Date of remote data in YYYY-MM-DD format (if available)
Character. Filename of the remote file (if available)
Numeric. Number of days difference between local and remote data (if both dates available)
If an error occurs or internet connection is not available, only the message element will contain relevant error information.
# Silent check (no messages) - requires internet connection
update_status <- check_data_update(silent = TRUE)
# Verbose check with connection verification
update_status <- check_data_update(silent = FALSE, check_connection = TRUE)
# Check without internet connection verification
update_status <- check_data_update(check_connection = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.