select_MODIS_by_date: Select MODIS files by date

Description Usage Arguments Value Examples

View source: R/select_MODIS_by_date.R

Description

This function copies or combines to a multilayer raster MODIS files that match the specified date criteria. Dates may be specified using Julian date or traditional date.

Usage

1
2
select_MODIS_by_date(files, output_directory, output_filename = NULL,
  selection, inverse = FALSE, convention = "standard", bylayer = FALSE)

Arguments

files

A character vector of absolute file paths to the files from which to select.

output_directory

A character file path to a directory where files will be written.

output_filename

A character for the name of the output multilayered raster. Ignored if bylayer=TRUE.

selection

A numeric vector of length 2 for the selection range (inclusive). The first value should be the date or Julian date of the start of the selection range. The second value should be the date or Julian date of the end of the selection range.

inverse

A logical indicating if the selection range should be inverted (e.g. select files that are outside the selection range.) If TRUE, the inverted selection range is exclusive.

convention

A character. Set this argument to "standard" if the file names are in the standard MODIS naming convention. Set this argument to "MODIStsp" if the files have been processed using MODIStsp (and thus follow its naming convention).

bylayer

A logical indicating if the individual raster outputs should remain separate (TRUE) or combined into a single multilayered raster file (FALSE).

Value

Nothing. This function has the side-effect of writing to a file.

Examples

1
2
3
4
## Not run: 
select_MODIS_by_date(list.files("C:/Desktop/MODIS_files", pattern="\\.tif$", full.names=TRUE), "C:/Desktop/selected_MODIS", c(20, 120))

## End(Not run)

jnghiem/bfasttools documentation built on Nov. 4, 2019, 3:02 p.m.