This function takes a path and an optional pattern as input and returns a list of MODIS files found in the specified path.
Usage
load_modis_files(path, pattern = "hdf$", date = character(2))
Examples
if (FALSE) { # \dontrun{
# Load MODIS files from the current directory
modis_files <-
load_modis_files(
".",
date = c("2018-01-01", "2018-01-31")
)
# Load MODIS files from a specific directory with a custom pattern
modis_files <-
load_modis_files(
"/path/to/files",
pattern = "MOD.*hdf$",
date = c("2018-01-01", "2018-01-31")
)
} # }