f.week: Accumulation into weeks

View source: R/fweek.R

f.weekR Documentation

Accumulation into weeks

Description

Internal function to accumulate data into weeks using different accumulation functions (mean, max, min, sum, etc.)

Usage

f.week(data.var, na_rm = F, f = mean, kind = "standard")

Arguments

data.var

data frame with time stamps

na_rm

boolean (should NA values be removed? Defaulf = F)

f

R function to be applied (default = mean)

kind

String indicating what is the size of the week. The default value is "standard" (conventional 7 day week). Other option is "noguera", that devides each month in 4 weeks (1 to 8; 9 to 15; 16 to 22; and 23 to 29/30/31)

Value

The function return a list with two elements. One data frame with time stamped pentad values and a matrix with the 52 (or 48) weeks organized in lines and years in columns.


pedroalencar1/fdClassify documentation built on Sept. 15, 2023, 3:46 a.m.