Learn R Programming

timeseriesdb (version 0.2.1)

createHstore: Create Hstore

Description

Function to Create Hstore Key Value Pair Mapping

Usage

createHstore(x, ...)

# S3 method for ts createHstore(x, ...)

# S3 method for data.frame createHstore(x, ...)

# S3 method for list createHstore(x, ...)

Arguments

x

a time series object, a two column data frame or object of S3 class miro (meta information for R objects).

...

optional arguments, fct = TRUE create text expressions of hstore function calls. also for data.frames key_pos and value_pos could be given if they are different from 1 and 2. e.g. position of the key col and pasition of the value col in a data.frame.

Details

This function creates a key value pair mapping from a time series object. It returns an hstore object that can be inserted to a PostgreSQL database relation field of type hstore.

Examples

Run this code
# NOT RUN {
ts1 <- ts(rnorm(100),start = c(1990,1),frequency = 4)
createHstore(ts1)
# }

Run the code above in your browser using DataLab