Learn R Programming

phenofit (version 0.2.5-2)

add_HeadTail: Add one year data in the head and tail

Description

Add one year data in the head and tail

Usage

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

Examples

Run this code
# NOT RUN {
library(phenofit)
data("MOD13A1")

dt <- tidy_MOD13.gee(MOD13A1$dt)
st <- MOD13A1$st

sitename <- dt$site[1]
d     <- dt[site == sitename, ] # get the first site data
sp    <- st[site == sitename, ] # station point

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

# }

Run the code above in your browser using DataLab