Description Usage Arguments Value Author(s) See Also Examples
This function is required to organise the data into the required structure for all functions of the package TSAgg.
1 | timeSeries(dates, dateformat, data = NULL,tz="GMT")
|
dates |
A vector, or data.frame of one column of dates. |
dateformat |
A string indicating the format of the dates (e.g. " |
data |
A vector or data.frame of data. Must be the same length as dates column. |
tz |
A character string specifying the time zone to be used. If not specified the system tz may be used. This is different on each OS, therefore it is recommended that this is supplied. Default is GMT. |
Returns a data.frame with dates formatted as as.POSIXlt
and data, if provided.
Jason Lessels <jason.lessels@sydney.edu.au>
1 2 3 4 5 6 7 8 9 | #Load the dataset foo:
data(foo)
#Look at the dataset foo for the date string format:
head(foo)
foo.ts <- timeSeries(foo[,1],"%d/%m/%Y %H:%M",foo[,3])
#Try entering data manually into the function:
one.date <- timeSeries("08-09-30","%y-%m-%d",4)
#Look at the results:
one.date
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.