prepare_script_for_POLARIS: Create wget script to download soil data files from POLARIS

View source: R/extract_soils_POLARIS.R

prepare_script_for_POLARISR Documentation

Create wget script to download soil data files from POLARIS

Description

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.

Usage

prepare_script_for_POLARIS(
  path = ".",
  version = "v1.0",
  vars = c("bd", "sand", "clay", "silt"),
  stat = "mean"
)

Arguments

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

Value

(Invisibly) the file path of the generated bash script.

References

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")}.

Examples

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)


DrylandEcology/rSW2exter documentation built on May 4, 2024, 10:53 p.m.