Description Usage Arguments Details Value
View source: R/approx_standprop.R
Uses yearly values of inter-annual vegetation development values (e.g. sai, height, densef, age) and interpolates them to a daily sequence.
1 2 3 | approx_standprop(x.years, y, y.ini = NULL, xout.years = x.years,
use_growthperiod = F, startdoy = 121, enddoy = 279,
approx.method = "constant", return_xout = F)
|
x.years |
A sequence of years or a single year |
y |
vector of the same length as x.years. If aprox.method = 'linear', the values are interpreted to be valid at the end of the respective year in x.years. |
y.ini |
initial value used as a starting point for linear interpolation. Interpreted to be valid at the 1st of January of the first year in x.years. Ignored if approx.method = 'constant'. |
xout.years |
years for which ouput is generated, maybe longer or shorter than x.years. For years outside x.years, the value of the closest data extrem is returned. |
use_growthperiod |
logical: Use startdoy and enddoy for linear interpolation? If TRUE, yearly changes take place between startdoy and enddoy, other wise from end of year to end of year. |
startdoy |
a single value or vector of the same length as x.years, with the day of year when growth begins. |
enddoy |
a single value or vector of the same length as x.years, with the day of year when growth cessates. |
approx.method |
name of interpolation method ('constant' or 'linear'). |
return_xout |
logical. If true, daily values of y AND a date vector are returned in a data.table. |
For approx.method = 'constant'
, the value of y is returned for the whole respective year in x.years,
which results in a yearly changing step function. If approx.method = 'linear'
,
the values of y are interpolated between the years in x.years, and interpreted to be reached
at the 31st of December of the respective x.years. In this case, y.ini is required as the initial value,
from which the sequence is interpolated to the first value of y. The linear changes are either accomplished
between 31st to 31st of December of the years in x.years, or during the growing season only (use_growingseason = TRUE).
A vector of interpolated daily values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.