Learn R Programming

timeseriesdb (version 0.2.1)

readTimeSeries: Read Time Series From PostgreSQL database

Description

This function reads a time series from a postgres database, that uses key value pair storage (hstore), to archive time series. After reading the information from the database a standard R time series object of class 'ts' is built and returned.

Usage

readTimeSeries(series, con, tbl = "v_timeseries_json",
  schema = "timeseries")

Arguments

series

character vector of series names.

con

a PostgreSQL connection object

tbl

character string denoting the name of the view containing the json records.

schema

SQL schema name. Defaults to timeseries.