Description Usage Arguments Value Author(s) See Also Examples
This function determines the year and season to which a given observation in the sample is related to, and the location in the sample of a given time specified by the year and the season.
1 2 | Mdates (wts, yso)
|
wts |
a univariate time series object. |
yso |
either a vector of length two indicating the year and season or a vector on length one indicating the location in the sample of an observation. |
An object of class vdate-class
.
Javier Lopez-de-Lacalle javlacalle@yahoo.es and Ignacio Diaz-Emparanza Ignacio.Diaz-Emparanza@ehu.es
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Mdates
data(AirPassengers)
## Which date is related to the 12th observation?
out1 <- Mdates(AirPassengers, 12)
out1
out1@Myso
## Where is located the observation in 1959.2
out2 <- Mdates(AirPassengers, c(1959,2))
out2
## Beyond the sample.
Mdates(AirPassengers, 150)
Mdates(AirPassengers, c(1970,2))
## Which is the next date after the 12th observation?
stepdate(as.vdate(AirPassengers, yso=12), step=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.