add_HeadTail: Add one year data in the head and tail

Description Usage Arguments Value Note Examples

View source: R/add_HeadTail.R

Description

Add the data of the year of year_start - 1 to the head, add the data of the year of year_end - 1 to the tail.

Usage

1
add_HeadTail(d, south = FALSE, nptperyear, trs = 0.45)

Arguments

d

A data.table, should have t (compositing date) or date (image date) column which are (Date variable).

south

Boolean. In south hemisphere, growing year is 1 July to the following year 31 June; In north hemisphere, growing year is 1 Jan to 31 Dec.

nptperyear

Integer, number of images per year.

trs

If nmissing < trs*nptperyear (little missing), this year is include to extract phenology; if FALSE, this year is excluded.

Value

data.table

Note

date is image date; t is compositing date.

Examples

1
2
3
4
5
library(phenofit)
data("CA_NS6"); d = CA_NS6

nptperyear = 23
dnew     <- add_HeadTail(d, nptperyear = nptperyear) # add one year in head and tail

phenofit documentation built on Oct. 15, 2021, 5:09 p.m.