View source: R/extract_soils_Miller1998_CONUSSoils.R
check_Miller1998_CONUSSoil | R Documentation |
Check that CONUSSoil soil data are locally available
check_Miller1998_CONUSSoil(
path = ".",
vars = c("rockdepm", "rockvol", "bd", "sand", "clay", "silt"),
lower_limits_by_vars = c(rockdepm = 0, rockvol = 0, bd = 30, sand = 0, clay = 0, silt =
0)
)
path |
A character string. The path to the local copy of the
CONUSSoil folder hierarchy, e.g.,
|
vars |
A vector of character strings. The requested variables as used by CONUSSoil; see Miller et al. 1998. |
lower_limits_by_vars |
A named numeric vector. The names correspond
to |
A logical vector of the length of vars
.
Miller, D. A., and R. A. White. 1998. A conterminous United States multilayer soil characteristics dataset for regional climate and hydrology modeling. Earth Interactions 2:1-26. http://www.soilinfo.psu.edu/index.cgi?soil_data&conus
script_to_download_conussoil <- prepare_script_for_Miller1998_CONUSSoil()
## Execute script to download data
## (or set `path_conussoil` to your local copy)
path_conussoil <- dirname(script_to_download_conussoil)
## Mask out unrealistic variable values
has_CONUSSoil_cond <- create_conditioned_Miller1998_CONUSSoil(
path = path_conussoil
)
## Check that we have CONUSSoil data
has_CONUSSoil <- check_Miller1998_CONUSSoil(path = path_conussoil)
# Do we have all files?
isTRUE(all(has_CONUSSoil))
# If not, then examine which variables are missing
has_CONUSSoil
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.