orgStruc.Rd 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/orgStruc.R
  3. \name{orgStruc}
  4. \alias{orgStruc}
  5. \title{Reorganise MODIS Files in Local Data Archive}
  6. \usage{
  7. orgStruc(from, to, structure, pattern, move = FALSE, quiet = FALSE)
  8. }
  9. \arguments{
  10. \item{from}{\code{character}. Local path to look for MODIS files, defaults to
  11. \code{options("MODIS_localArcPath")} (see \code{\link{MODISoptions}}).}
  12. \item{to}{\code{character}. Target folder to move (or copy) MODIS files to,
  13. defaults to \code{options("MODIS_localArcPath")}.}
  14. \item{structure}{\code{character}. Storage structure, defaults to
  15. \code{options("MODIS_arcStructure")} (see Examples).}
  16. \item{pattern}{Regular expression passed to \code{\link{list.files}}. Insert
  17. a pattern if you want to extract specific files from your archiv.}
  18. \item{move}{\code{logical}. If \code{TRUE} (default), files are moved and
  19. duplicated files are deleted. If \code{FALSE}, files are just copied and thus
  20. remain in the origin folder. Note that the copying process performs rather
  21. slowly when dealing with large files, e.g. 250-m 'MOD13Q1'.}
  22. \item{quiet}{\code{logical}, defaults to \code{FALSE}.}
  23. }
  24. \value{
  25. If \code{quiet = FALSE}, information on how many files have been moved (or
  26. copied) and deleted is printed to the console.
  27. }
  28. \description{
  29. Re-organise the storage structure of your MODIS archive according to the
  30. settings in \code{options("MODIS_arcStructure")}. Depending on the specified
  31. \code{'source'} , you can also use this function to gather all MODIS grid
  32. files on you computer and reorganise them. The main purpose is to organise
  33. the archive, but it is also possible to copy a subset of files to a
  34. desidered location!
  35. }
  36. \examples{
  37. \dontrun{
  38. # MOVE all MODIS grid data to the directory and structure as defined in
  39. # options("MODIS_localArcPath", "MODIS_arcStructure")
  40. orgStruc(move = TRUE)
  41. # COPY all MOD13Q1 from 2001 to folder "MyFiles/MOD13Q1.collection/"
  42. orgStruc(pattern="MOD13Q1.A2001*.",to="MyFiles",structure="PRODUCT.CCC")
  43. # COPY all MOD13Q1 to folder "MyFiles/"
  44. orgStruc(pattern="MOD13Q1.*.",to="MyFiles",structure="")
  45. }
  46. }
  47. \author{
  48. Matteo Mattiuzzi
  49. }