Learn R Programming

prism (version 0.1.0)

check_corrupt: Check the integrity of downloaded PRISM data

Description

Uses the raster::stack function to determine if the bil files are readable. Any that are not readable are redownloaded.

Usage

check_corrupt(type, minDate = NULL, maxDate = NULL, dates = NULL)

Arguments

type

The type of data to download, must be "ppt", "tmean", "tmin", or "tmax". Note that tmean == mean(tmin, tmax).

minDate

a valid iso-8601 (e.g. YYYY-MM-DD) date to start downloading data. May be provided as either a character or Date class.

maxDate

a valid iso-8601 (e.g. YYYY-MM-DD) date to end downloading data. May be provided as either a character or Date class.

dates

a vector of iso-8601 formatted dates to download data for, can also be a single date. May be provided as either a character or Date class.

Value

logical indicating whether the process succeeded.