ras_calc_mean: Calculate mean of each raster layer

Description Usage Arguments Value Examples

Description

This function allows you to calculate the mean of all pixel values per layer in a raster stack. A tibble with mean values and a column with a provided date flag is returned and can be used for forther analysis and plotting.

Usage

1
ras_calc_mean(ras_stack, date_flag)

Arguments

ras_stack

Raster stack to analyse.

date_flag

A vector containing the date flags of each layer, e.g. observation years, which is appended to result. Ascending numbers are assigned if empty.

Value

A tibble with calculated mean pixel values per whole layer and according date flags.

Examples

1
2
3
4
5
# load processed data
ndvi_m_px_1 <- stack(".../phenoTS/example_scripts/MODIS_data_processed/ndvi_m_px_1.tif")

# mean of all pixels in layer
ndvi_m_1 <- ras_calc_mean(ndvi_m_px_1,date_flag=c(2000:2018))

malinfischer/phenoTS documentation built on May 14, 2019, 12:56 a.m.