TSquery: Construct Time Series Data From a Database

Description Usage Arguments Details Value See Also

Description

Construct a time series from a database

Usage

1
2
    TSquery(select, dateField, table, where=NULL, frequency="monthly",
             na.as=0, names=NULL, con=options()$connection)

Arguments

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 "daily", "monthly" or "annual" are currently supported.

na.as

value to be used to replace NAs in the returned series.

names

optional vector of character strings to be used for the returned series. If not NULL it must have length equal to the number of series returned.

con

A database connection.

Details

This functions is unlike other functins in this package (and may eventually be moved to a separate package). It constructs 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)

Value

A time series or time series matrix.

See Also

TSget,


TSsql documentation built on May 2, 2019, 5:20 p.m.

Related to TSquery in TSsql...