series {aion} | R Documentation |
Create Time Series
Description
Create Time Series
Usage
series(object, time, calendar, ...)
## S4 method for signature 'array,RataDie,missing'
series(object, time, names = NULL)
## S4 method for signature 'array,numeric,TimeScale'
series(object, time, calendar, scale = 1, names = NULL)
## S4 method for signature 'matrix,numeric,TimeScale'
series(object, time, calendar, scale = 1, names = NULL)
## S4 method for signature 'matrix,RataDie,missing'
series(object, time, names = NULL)
## S4 method for signature 'numeric,numeric,TimeScale'
series(object, time, calendar, scale = 1, names = NULL)
## S4 method for signature 'numeric,RataDie,missing'
series(object, time, names = NULL)
## S4 method for signature 'data.frame,numeric,TimeScale'
series(object, time, calendar, scale = 1, names = NULL)
## S4 method for signature 'data.frame,RataDie,missing'
series(object, time, names = NULL)
Arguments
object |
A |
time |
A |
calendar |
A |
... |
Currently not used. |
names |
A |
scale |
A length-one |
Details
Data will be sorted in chronological order.
Value
A TimeSeries
object.
Author(s)
N. Frerebeau
See Also
Other time series tools:
data.frame
,
span()
,
start()
,
time()
,
window()
Examples
## Create time-series of 20 observations
## Univariate
## Sampled every years starting from 1029 BCE
(X <- series(rnorm(30), time = 1029:1000, calendar = BCE()))
## Terminal and sampling times (returns rata die)
start(X)
end(X)
time(X)
span(X)
## Multivariate
## Sampled every century starting from 1000 CE
(Y <- series(matrix(rnorm(90), 30, 3), time = 1000:1029, calendar = CE()))
## Terminal and sampling times (returns Gregorian Common Era years)
start(Y, calendar = CE())
end(Y, calendar = CE())
time(Y, calendar = CE())
span(Y, calendar = CE())
## Coerce to data frame
df <- as.data.frame(Y, calendar = BP())
head(df)
[Package aion version 1.0.4 Index]