Delay {EmiStatR}R Documentation

Delay function for time series

Description

This function allows to cretae a n-time steps delayed time series, where n is the number of time steps defined by argument x. Henceforth, it is possible to calibrate this argument (parameter) x.

Usage

  Delay(P1, x)

Arguments

P1

A data.frame that contains the time series of the environmental variable to be delayed, e.g. precipitation. This data.frame should have at least two columns: the first one, Time [y-m-d h:m:s]; the second one, a numeric value equal to the magnitude of the environmental variable. If the environmental variable is different than precipitation, then the column name of the values should be named as value.

x

A numeric value that specifies the delayed time in time steps.

Value

A data.frame with two columns:

time

the date-time time series of the delayed variable

value

time series with the magnitude (equal to the original, P1, time series) of the delayed variable.

Author(s)

J.A. Torres-Matallana

Examples

library(EmiStatR)
data(P1)

P1_delayed <- Delay(P1 = P1, x = 500)

head(P1_delayed)

dev.new()
par(mfrow = c(2, 1))
plot(P1[,1], P1[,2], typ = "l", col = "blue")
plot(P1_delayed[,1], P1_delayed[,2], typ= "l", col = "red")

[Package EmiStatR version 1.2.3.0 Index]