GetData - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

TimeSeriesAnalysis

 GetData
 obtain raw data from time series
 GetDates
 obtain dates from time series
 GetDateFormat
 obtain default date format from time series
 obtain headers from time series
 GetPeriod
 obtain period from time series

 Calling Sequence GetData(TS, readonly_opt) GetDates(TS, format_opt) GetDateFormat(TS) GetHeaders(TS) GetPeriod(TS)

Parameters

 TS - TimeSeries object readonly_opt - (optional) equation of the form readonly = true or false format_opt - (optional) equation of the form format = formatvalue

GetData

 • This command returns a Matrix where each data set in $\mathrm{TS}$ occupies one column.
 • If the keyword readonly is supplied, or the option readonly = true, then the Matrix returned is a read-only alias of the Matrix actually in the TimeSeries object. If the option readonly = false is supplied (the default), then the Matrix returned is a copy of the Matrix TimeSeries object.

GetDates

 • This command returns a column Vector of the dates of the TimeSeries object.
 • By default, the date format stored as the default date format is returned. This date format can be obtained with the $\mathrm{GetDateFormat}$ command. A different format can be selected with the format = str option, where str is a string. This string is passed to StringTools[FormatTime]. If str is the string "unformatted", then the dates are returned a Vector of numbers.

GetDateFormat

 • This command returns the default formatting string.

 • This command returns the list of headers of the data sets.

GetPeriod

 • This command returns the period optionally used for seasonal models, as the number of observations per season.

Examples

 > $\mathrm{with}\left(\mathrm{TimeSeriesAnalysis}\right):$
 > $\mathrm{ts}≔\mathrm{TimeSeries}\left(\left[\left[4,5,6\right],\left[2,1,2\right]\right],'\mathrm{headers}'=\left["Monthly sales","Monthly profits"\right],'\mathrm{startdate}'="2013-01-31",'\mathrm{frequency}'="monthly"\right)$
 ${\mathrm{ts}}{≔}\left[\begin{array}{c}{\mathrm{Time series}}\\ {\mathrm{Monthly sales, Monthly profits}}\\ {\mathrm{3 rows of data:}}\\ {\mathrm{2013-01-31 - 2013-03-31}}\end{array}\right]$ (1)

A copy of the data, and a read-only alias of the data.

 > $\mathrm{GetData}\left(\mathrm{ts}\right)$
 $\left[\begin{array}{cc}{4.}& {2.}\\ {5.}& {1.}\\ {6.}& {2.}\end{array}\right]$ (2)
 > $\mathrm{GetData}\left(\mathrm{ts},'\mathrm{readonly}'=\mathrm{true}\right)$
 $\left[\begin{array}{cc}{4.}& {2.}\\ {5.}& {1.}\\ {6.}& {2.}\end{array}\right]$ (3)

The dates for this time series in various formats.

 > $\mathrm{GetDates}\left(\mathrm{ts}\right)$
 $\left[\begin{array}{c}{"2013-01-31"}\\ {"2013-02-28"}\\ {"2013-03-31"}\end{array}\right]$ (4)
 > $\mathrm{GetDates}\left(\mathrm{ts},\mathrm{format}="%D"\right)$
 $\left[\begin{array}{c}{"01/31/13"}\\ {"02/28/13"}\\ {"03/31/13"}\end{array}\right]$ (5)
 > $\mathrm{GetDates}\left(\mathrm{ts},\mathrm{format}="unformatted"\right)$
 $\left[\begin{array}{c}{1359590400}\\ {1362009600}\\ {1364684400}\end{array}\right]$ (6)

 > $\mathrm{GetHeaders}\left(\mathrm{ts}\right)$
 $\left[{"Monthly sales"}{,}{"Monthly profits"}\right]$ (7)

The period. There are 12 months in a year.

 > $\mathrm{GetPeriod}\left(\mathrm{ts}\right)$
 ${12}$ (8)

Compatibility

 • The TimeSeriesAnalysis[GetData], TimeSeriesAnalysis[GetDates], TimeSeriesAnalysis[GetDateFormat], TimeSeriesAnalysis[GetHeaders] and TimeSeriesAnalysis[GetPeriod] commands were introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.