filter_winter: Filter winter NDVI

Description Usage Arguments Details Value See Also Examples

View source: R/filter.R

Description

Using lower quantile (default = 0.025) of multi-year MODIS data, determine the "winterNDVI" for each id.

Usage

1
2
3
4
5
6
7
filter_winter(
  DT,
  probs = 0.025,
  limits = c(60L, 300L),
  doy = "DayOfYear",
  id = "id"
)

Arguments

DT

data.table of NDVI time series

probs

quantile probability to determine "winterNDVI". default is 0.025.

limits

integer vector indicating limit days of absolute winter (snow cover, etc.). default is c(60, 300): 60 days after Jan 1 and 65 days before Jan 1.

doy

julian day column. default is 'DayOfYear'.

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 'winter' column of each id's "winterNDVI" baseline value.

See Also

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

Examples

1
2
3
4
5
6
7
# 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')

irg documentation built on Dec. 22, 2021, 9:06 a.m.