View source: R/extract_soils_POLARIS.R
prepare_script_for_POLARIS | R Documentation |
This function only writes out a text file to disk. The user is responsible to run the script after making sure that wget is available and the script is executable.
prepare_script_for_POLARIS(
path = ".",
version = "v1.0",
vars = c("bd", "sand", "clay", "silt"),
stat = "mean"
)
path |
A character string. The path to where the local copy of the POLARIS folder hierarchy and files should be downloaded. |
version |
A character string. The POLARIS release version. |
vars |
A vector of character strings. See Chaney et al. 2019 |
stat |
A vector of character strings. See Chaney et al. 2019 |
(Invisibly) the file path of the generated bash script.
Chaney, N. W., B. Minasny, J. D. Herman, T. W. Nauman, C. Brungard, C. L. S. Morgan, A. B. McBratney, E. F. Wood, and Y. T. Yimam. 2019. POLARIS soil properties: 30-meter probabilistic maps of soil properties over the contiguous United States. Water Resources Research 55:2916-2938. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1029/2018WR022797")}.
fname_wget_polaris <- prepare_script_for_POLARIS()
## in a shell
## give execute permission if needed: chmod +x <fname_wget_polaris>
## download data: ./<fname_wget_polaris>
unlink(fname_wget_polaris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.