download_ecotox_data | R Documentation |
In order for this package to fully function, a local copy of the ECOTOX database needs to be build. This function will download the required data and build the database.
download_ecotox_data(
target = get_ecotox_path(),
write_log = TRUE,
ask = TRUE,
verify_ssl = getOption("ECOTOXr_verify_ssl"),
...
)
target |
Target directory where the files will be downloaded and the database compiled. Default is
|
write_log |
A |
ask |
There are several steps in which files are (potentially) overwritten or deleted. In those cases
the user is asked on the command line what to do in those cases. Set this parameter to |
verify_ssl |
When set to |
... |
Arguments passed on to |
This function will attempt to find the latest download url for the ECOTOX database from the
EPA website (see get_ecotox_url()
).
When found it will attempt to download the zipped archive containing all required data. This data is then
extracted and a local copy of the database is build.
Use 'suppressMessages()
' to suppress the progress report.
Returns NULL
invisibly.
On some machines this function fails to connect to the database download URL from the
EPA website due to missing
SSL certificates. Unfortunately, there is no easy fix for this in this package. A work around is to download and
unzip the file manually using a different machine or browser that is less strict with SSL certificates. You can
then call build_ecotox_sqlite()
and point the source
location to the manually extracted zip
archive. For this purpose get_ecotox_url()
can be used. Alternatively, one could try to call download_ecotox_data()
by setting verify_ssl = FALSE
; but only do so when you trust the download URL from get_ecotox_URL().
Pepijn de Vries
## Not run:
## This will download and build the database in your temp dir:
download_ecotox_data(tempdir())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.