Learn R Programming

spatialEco (version 0.1-5)

download.prism: Download PRISM

Description

Batch download of monthly gridded PRISM climate data

Usage

download.prism(data.type, date.range, time.step = "monthly", download.folder = getwd(), by.year = FALSE, unzip.file = TRUE, ftp.site = "ftp://prism.oregonstate.edu")

Arguments

data.type
Specify climate metric ('ppt','tmin','tmax','tmean')
date.range
A vector with start and end date in y/m/d format
time.step
Timestep of product ('daily'/'monthly')
download.folder
Local download directory, defaults to current working directory
by.year
Create a directory for each year (TRUE/FALSE)
unzip.file
Unzip file on download (TRUE/FALSE)
ftp.site
PRISM ftp address to use, default: ftp://prism.oregonstate.edu

Value

Compressed or uncompressed PRISM monthly gridded data(bil raster format)

See Also

download.daymet, download.hansen

Examples

Run this code
## Not run: 
#    my.dates <- c('2000/1/1', '2001/12/30')
#    download.prism('ppt', date.range=my.dates, time.step='monthly', by.year=TRUE)
# 
# # Download monthly precipitation data Jan 1st 2000 to Feb 10th 2000 (n=41)
#    my.dates <- c('2000/1/1', '2000/2/10')
#    download.prism('ppt', date.range=my.dates, time.step='daily', by.year=TRUE)
# ## End(Not run)

Run the code above in your browser using DataLab