Learn R Programming

MODIS (version 1.1.2)

addCollection: Add New Product to MODIS Collections

Description

addCollection is a non-exported helper function to add a new product column to the product collections managed by MODIS (see MODIS:::collections). Once added, the specified product will be tracked and, if required, kept up-to-date by getCollection.

Usage

addCollection(product, collection = NA, path_ext = "inst/external",
  overwrite = FALSE, ...)

Arguments

product

Character. Name of the product that should be added to the 'collections' dataset, see getCollection.

collection

Numeric. Optional information about available collections. If not supplied, this defaults to 'NA' and the user is required to manually retrieve information about available collections via getCollection(..., forceCheck = TRUE). Note that the latter operation requires the previous execution of MODIS:::addProduct and MODIS:::addServer to make the newly added product available to getCollection.

path_ext

Character. Path to folder containing file 'MODIS_Products.RData'. When working with RStudio projects (.Rproj), this usually defaults to 'inst/external'.

overwrite

Logical. If TRUE, the initial '.RData' file located in 'path_ext' will be overwritten.

...

Currently not used.

Value

A 'data.frame' which, for each product featured by MODIS, holds information about available collections.

See Also

MODIS:::collections.

Examples

Run this code
# NOT RUN {
## E.g., add collection of MODIS evapotranspiration product
MODIS:::addCollection(product = "MOD16A2", collection = 105)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab