addCollection.Rd 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/addCollection.R
  3. \name{addCollection}
  4. \alias{addCollection}
  5. \title{Add New Product to MODIS Collections}
  6. \usage{
  7. addCollection(product, collection = NA, path_ext = "inst/external",
  8. overwrite = FALSE, ...)
  9. }
  10. \arguments{
  11. \item{product}{Character. Name of the product that should be added to the
  12. 'collections' dataset, see \code{\link{getCollection}}.}
  13. \item{collection}{Numeric. Optional information about available collections.
  14. If not supplied, this defaults to 'NA' and the user is required to manually
  15. retrieve information about available collections via
  16. \code{getCollection(..., forceCheck = TRUE)}. Note that the latter operation
  17. requires the previous execution of \code{MODIS:::addProduct} and
  18. \code{MODIS:::addServer} to make the newly added product available to
  19. \code{\link{getCollection}}.}
  20. \item{path_ext}{Character. Path to folder containing file
  21. 'MODIS_Products.RData'. When working with RStudio projects (.Rproj), this
  22. usually defaults to 'inst/external'.}
  23. \item{overwrite}{Logical. If \code{TRUE}, the initial '.RData' file located
  24. in 'path_ext' will be overwritten.}
  25. \item{...}{Currently not used.}
  26. }
  27. \value{
  28. A 'data.frame' which, for each product featured by \strong{MODIS}, holds
  29. information about available collections.
  30. }
  31. \description{
  32. \code{addCollection} is a non-exported helper function to add a new product
  33. column to the product collections managed by \strong{MODIS} (see
  34. \code{MODIS:::collections}). Once added, the specified product will be
  35. tracked and, if required, kept up-to-date by \code{\link{getCollection}}.
  36. }
  37. \examples{
  38. \dontrun{
  39. ## E.g., add collection of MODIS evapotranspiration product
  40. MODIS:::addCollection(product = "MOD16A2", collection = 105)
  41. }
  42. }
  43. \seealso{
  44. \code{MODIS:::collections}.
  45. }
  46. \author{
  47. Florian Detsch
  48. }