ma8h | R Documentation |
function to calculate Ozone 8-hour moving average for a data.frame
ma8h(data, time = "date", var, verbose = TRUE, ...)
data |
data.frame with time column and variable columns to be processed |
time |
name of the time column (default is date) in POSIXct |
var |
name of the columns to be calculated |
verbose |
display additional information |
... |
parameters passed to hourly |
data.frame with time and the 8-hour moving average
model_file <- paste(system.file("extdata", package = "eva3dm"),
"/model_o3_ugm3_36km.Rds", sep="")
model <- readRDS(model_file)
model_8h <- ma8h(model)
plot(model$date,model$Campinas, pch = 19,
main = expression(O[3]~~'['*mu*g*m^-3*']'))
points(model_8h$date,model_8h$Campinas, col = 'blue', pch = 19)
legend('topleft',bty = 'n',
pch = 19,
legend = c('hourly','8h-mov average'),
col = c('black','blue'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.