create7DayMovingAverage: Calculates a 7 day rolling mean for specified variable for...

View source: R/create7DayMovingAverage.R

create7DayMovingAverageR Documentation

Calculates a 7 day rolling mean for specified variable for the data.table given

Description

'createDailyMeanPlot' returns a plot which calculates the mean of yVar and plots it for 2020 and 2017-2019 to compare the values for the same date over previous years. This assumes the

Usage

create7DayMovingAverage(dt, avgVar, byVars)

Arguments

dt

a data table with a summary variable you want to average

avgVar

the variable you want to average

byVars

the variables you want to group by (e.g. obsDate and compareYear) as a vector thus: byVars <- c("obsDate", "compareYear")

Author(s)

Ben Anderson, b.anderson@soton.ac.uk


CfSOtago/gridCarbon documentation built on April 5, 2022, 6:46 a.m.