Description Usage Arguments Details Value See Also Examples
View source: R/get.aggregated.value.R
Function to get the aggregated value for a single aggregation period
1 2 3 | get.aggregated.value(date, data, agg.length, agg.fun = "sum",
agg.na.thres = 10, agg.interpolation = c("none", "linear", "mean",
"zeros"), period.warn = TRUE)
|
date |
date for which the aggregated value is determined |
data |
an xts object containing daily data |
agg.length |
length of the aggregation period in days |
agg.fun |
function on x to apply to the aggregation data, default is 'sum' |
agg.na.thres |
threshold for the percentage of na values allowed in the aggregation period data, default = 10 |
agg.interpolation |
interpolation type for missing values in individual aggregation period data before applying agg.fun: 'none' (default, NA's are removed), 'linear', 'mean', or 'zeros' |
period.warn |
if TRUE, a warning is when the requested aggregation period contains dates not included in data |
This function determines the dates in an aggregation period for standardized index calculation, extracts the corresponding data and applies an aggregation function to the data (default is 'sum', but any function on x can be passed).
A numeric value giving the aggregated value for the aggregation period
standardized.index
, get.reference.values
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.