ws_download | R Documentation |
Downloads both the database and gridded HWSD v2.0 data products to a desired output path for subsetting.
ws_download(ws_path = file.path(tempdir(), "ws_db"), verbose = FALSE)
ws_path |
the path / directory where to store the HWSD v2.0 database |
verbose |
verbose messaging of downloading and managing the gridded data file |
When an existing path is used which is not the temporary directory an environmental variable WS_PATH can be set by creating an ~/.Renviron file using usethis::edit_r_environ() and entering the path as:
WS_PATH = "/your/full/path"
This variable will override the default temporary directory if it exists. This allows the gridded data to be stored elsewhere and be forgotten (while using the hwsdr package for HWSD v2.0).
Should you delete the gridded file, the environmental variable should be altered and set again by editting the ~/.Renviron file to a new location.
current data path
## Not run:
# Download the gridded soil map of
# HWSD v2.0 to the temporary directory
ws_download()
# download the same data to a specific
# directory (which should exist)
ws_download(
ws_path = "~/my_path"
)
# download the same data to a specific
# directory (which should exist) and
# update the environmental variable
ws_download(
ws_path = "~/my_path",
verbose = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.