TSquery {TSdbi} | R Documentation |
Construct a time series from a database
TSquery(select, dateField, table, where=NULL, frequency="monthly", con=options()$connection)
select |
character string used to construct query. |
dateField |
character string used to construct query. |
table |
character string used to construct query. |
where |
character string used to construct query. |
frequency |
character string used to specify frequency of the result (only "monthly" or "annual" are currently supported. |
con |
A database connection. |
This functions is unlike other functins in this package (and may eventually be
moved to a separate package).
It construct a time series from a database (using a connection) and a query
generated with the function arguments. An example query might be something like
z<- TSquery(select="SUM(amount )", dateField="issue_date", table="term",
where="term > 10", frequency="annual", con=con)
A time series or time series matrix.