filter_top {irg}R Documentation

Filter top NDVI

Description

Using upper quantile (default = 0.925) of multi-year MODIS data, determine the top NDVI for each id.

Usage

filter_top(DT, probs = 0.925, id = "id")

Arguments

DT

data.table of NDVI time series

probs

quantile probability to determine top. default is 0.925.

id

id column. default is 'id'. See details.

Details

The id argument is used to split between sampling units. This may be a point id, polygon id, pixel id, etc. depending on your analysis.

Value

filtered data.table with appended 'top' column of each id's top (quantile) NDVI value.

See Also

Other filter: filter_ndvi(), filter_qa(), filter_roll(), filter_winter()

Examples

# Load data.table
library(data.table)

# Read example data
ndvi <- fread(system.file("extdata", "sampled-ndvi-MODIS-MOD13Q1.csv", package = "irg"))

filter_qa(ndvi, ndvi = 'NDVI', qa = 'SummaryQA', good = c(0, 1))
filter_winter(ndvi, probs = 0.025, limits = c(60L, 300L), doy = 'DayOfYear', id = 'id')
filter_roll(ndvi, window = 3L, id = 'id')
filter_top(ndvi, probs = 0.925, id = 'id')

[Package irg version 0.1.6 Index]