if (FALSE) {
# Assumes 2000-2002 annual precipitation data is already downloaded
pd <- prism_archive_subset('ppt', 'annual', years = 2000:2002)
pd_get_name(pd)
## [1] "2000 - 4km resolution - Precipitation" "2001 - 4km resolution - Precipitation"
## [3] "2002 - 4km resolution - Precipitation"
pd_get_date(pd)
## [1] "2000-01-01" "2001-01-01" "2002-01-01"
pd_get_type(pd)
## [1] "ppt" "ppt" "ppt"
pd_to_file(pd[1])
## [1] "C:/prismdir/PRISM_ppt_stable_4kmM3_2000_bil/PRISM_ppt_stable_4kmM3_2000_bil.bil""
}
Run the code above in your browser using DataLab