Downloads both the database and gridded HWSD v2.0 data productsto a desired output path for subsetting.
current data path
When an existing path is used which is not the temporary directoryan environmental variable WS_PATH can be set by creating an ~/.Renviron fileusing 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 bealtered and set again by editting the ~/.Renviron file to a new location.
if(FALSE){# \dontrun{# Download the gridded soil map of# HWSD v2.0 to the temporary directoryws_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 variablews_download( ws_path="~/my_path", verbose=TRUE)}# }