orgStruc: Re-organise MODIS files in the local data archive

Description Usage Arguments Value Author(s) Examples

Description

This function organises the storage structure of the MODIS-archive accordingly to the settings in '~/.MODIS_opts.R'. depending on the 'source' you set, you can also use this function to gatter all MODIS-grid files on you Computer and organise it like it is set in '~/.MODIS_opts.R'. The main purpose is the organisation of the archive, but it is also possible to use it for coping a subset of files to a desidered location!

Usage

1
orgStruc( from, to, structure, pattern, move=FALSE, quiet=FALSE)

Arguments

from

Character. Local path to look for MODIS files. If missing the default archive options("MODIS_localArcPath") is used. Most of the time from corresponds to localArcPath but it is not neccessary! I.e. if you want to gather all MODIS data on your Computer home use '~/'.

to

Character. Default is options("MODIS_localArcPath"). Found data is copied/moved to this base directory

structure

Character. Default is options("MODIS_arcStructure"). But you can create your own structure. See examples.

pattern

Regular expression passed to ?list.files. Insert a pattern if you want to extract specific files from your archiv.

move

Logical. Default is TRUE, this means that files are moved and multiple files are deleted. If FALSE, files are just copied and remain in origin folder!

quiet

Logical. Default is FALSE

Value

If quiet==FALSE an information of how many files have been moved/copied or deleted.

Author(s)

Matteo Mattiuzzi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# MOVE all MODIS grid data to the directory and structure how defined in the '~/.MODIS_opts.R' file
# (Please check before running: \code{options("MODIS_localArcPath")})
orgStruc()

# COPY all MOD13Q1 from 2001 to folder "~/MyFiles/MOD13Q1.collection/"
orgStruc(pattern="MOD13Q1.A2001*.",to="~/MyFiles",structure="PRODUCT.CCC",move=FALSE)

# COPY all MOD13Q1 to folder "~/MyFiles/"
orgStruc(pattern="MOD13Q1.*.",to="~/MyFiles",structure="",move=FALSE) 

## End(Not run)

aubreyd/modis4rwrfhydro documentation built on May 10, 2019, 2:13 p.m.