Performs some simple tests to check whether the
locally built database is not corrupted.
check_ecotox_build(path = get_ecotox_path(), version, ...)
Returns an indicative logical value whether the database is not corrupted.
TRUE
indicates the database is most likely OK. FALSE
indicates that something might
be wrong. Additional messages (when FALSE
) are included as attributes containing hints
on the outcoming of the tests. See also the 'details' section.
A character
string with the path to the location of the local database (default is
get_ecotox_path()
).
A character
string referring to the release version of the database you wish to locate.
It should have the same format as the date in the EPA download link, which is month, day, year, separated by
underscores ("%m_%d_%Y"). When missing, the most recent available copy is selected automatically.
Arguments that are passed to dbConnect()
method
or dbDisconnect()
method.
Pepijn de Vries
For now this function tests if all expected tables are present in the locally built
database. Note that in later release of the database some tables were added. Therefore
for older builds this function might return FALSE
whereas it is actually just fine
(just out-dated).
Furthermore, this function tests if all tables contain one or more records. Obviously, this is no guarantee that the database is valid, but it is a start.
More tests may be added in future releases.
Other database-access-functions:
check_ecotox_availability()
,
check_ecotox_version()
,
cite_ecotox()
,
dbConnectEcotox()
,
get_ecotox_info()
,
get_ecotox_sqlite_file()
,
list_ecotox_fields()
Other database-build-functions:
build_ecotox_sqlite()
,
check_ecotox_version()
,
download_ecotox_data()
,
get_ecotox_url()
if (check_ecotox_availability()) {
check_ecotox_build()
}
Run the code above in your browser using DataLab