I have calculated several different indices for lakes stored as GEOTiff. I now want to write a loop with R to average the values for each lake, so only one value is left for each lake. And then create a table with the global means/medians and the date which is given in the filenames.
Input is raster data with following naming convention:
ndci__LC08__192023__20130515.TIFF
ndci__LC08__192023__20130803.TIFF . . . I uploaded five of my rasters here:
https://www.dropbox.com/s/fax1a16tvg0iohd/ndci_LC08_192023_201305151.tif?dl=0 https://www.dropbox.com/s/ghre1290pj0mwnl/ndci_LC08_192023_201404161.tif?dl=0 https://www.dropbox.com/s/cu1x3kxnd8koz2d/ndci_LC08_192023_201503181.tif?dl=0 https://www.dropbox.com/s/s2uqsj6f14b5u06/ndci_LC08_192023_201508091.tif?dl=0 https://www.dropbox.com/s/044b5vll1rsrd8a/ndci_LC08_192023_2013080321.tif?dl=0
So the output format I am looking for is:
Date Mean/Median of Index Satellite
20130515 5.4 LC08
20130803 8.7 LC08
. . .
. . .
. . .