downloadGimms: Download GIMMS NDVI3g Data

Description Usage Arguments Value See Also Examples

Description

Download GIMMS NDVI3g data from the NASA Ames Ecological Forecasting Lab, optionally for a given period of time. Both NDVI3g.v1 (NetCDF, until end 2015) and NDVI3g.v0 (ENVI binary, until end 2013) are available.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## S4 method for signature 'Date'
downloadGimms(x, y, version = 1L, dsn = getwd(),
  overwrite = FALSE, quiet = TRUE, mode = "wb", cores = 1L, ...)

## S4 method for signature 'numeric'
downloadGimms(x, y, version = 1L, dsn = getwd(),
  overwrite = FALSE, quiet = TRUE, mode = "wb", cores = 1L, ...)

## S4 method for signature 'character'
downloadGimms(x, dsn = getwd(), overwrite = FALSE,
  quiet = TRUE, mode = "wb", cores = 1L, ...)

## S4 method for signature 'missing'
downloadGimms(version = 1L, dsn = getwd(),
  overwrite = FALSE, quiet = TRUE, mode = "wb", cores = 1L, ...)

Arguments

x

Start time for data download as either Date object (e.g., as.Date("2000-01-01")) or numeric year (e.g., 2000). Alternatively, a character vector of online filepaths to download created from updateInventory. If missing, all files available only are being downloaded.

y

End time for data download as either Date object or numeric year. Ignored if 'x' is a character object or missing.

version

integer (or any other convertible class), defaults to 1L. Specifies desired GIMMS NDVI3g product version, see 'Details' in updateInventory. Ignored if 'x' is a character object.

dsn

character, defaults to the current working directory. Target folder for file download.

overwrite

logical, defaults to FALSE. If TRUE, identically named files in 'dsn' will be overwritten.

quiet

logical. If TRUE (default), console output is reduced.

mode

character. See download.file.

cores

integer, defaults to 1L. Number of cores used for parallel processing. Note that a fast internet connection is required in order for parallelization to take effect.

...

Further arguments passed to download.file, e.g. 'method'.

Value

A character vector of local filepaths.

See Also

updateInventory, download.file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
## 'Date' method
gimms_files_date <- downloadGimms(x = as.Date("2000-01-01"),
                                  y = as.Date("2000-12-31"))

## 'numeric' method (i.e., particular years)
gimms_files_year <- downloadGimms(x = 2000,
                                  y = 2002)

## 'character' method (i.e., particular files)
gimms_files_char <- updateInventory()
gimms_files_char <- downloadGimms(x = gimms_files[1:6])

## 'missing' method (i.e., entire collection)
gimms_files_full <- downloadGimms()

## End(Not run)

gimms documentation built on May 29, 2017, 9:37 a.m.