This function is used to compare the raster files of two different epochs. The order as well as the arithmetic operation of the comparision can be specified by the user. The paths to the raster files comprising the first and second epoch are the main inputs. When more than one raster file per epoch is handed to the function an aggregation function is applied per pixel for each of the epochs.

compare_epochs(
  epoch1_files = NULL,
  epoch2_files = NULL,
  order = c(1, 2),
  aggregation = "mean",
  stat = "-"
)

Arguments

epoch1_files

A character vector pointing to one or more raster files to be considered as part of the first epoch.

epoch2_files

character vector pointing to one or more raster files to be considered as part of the second epoch.

order

A numeric vector of length 2 indicating the order of the epoch comparison. Either c(1,2) which will put the first epoch first or c(2,1) which will put the second epoch first.

aggregation

A character vector indicating the aggregation operations applied to each pixel individually for each epoch when more than one file per epoch are handed to the function. Must be one of mean, max, min, median, sum, range, and prod.

stat

A charachter vector indicating the arithmetic operation for the comparison. Must be one of "-", "+", "*", "/".

Value

A spatRaster.

Author

Darius Görgen (MapTailor Geospatial Consulting GbR) info@maptailor.net
Maintainer: MAPME-Initiative contact@mapme-initiative.org
Contact Person: Dr. Johannes Schielein
Copyright: MAPME-Initiative
License: GPL-3