Learn R Programming

highfrequency (version 0.7.0.1)

getPrice: Get price column(s) from a timeseries

Description

Will attempt to locate price column(s) from a time series with rational defaults.

Usage

getPrice(x, symbol = NULL, prefer = NULL)

Arguments

x

A data object with columns containing data to be extracted

symbol

text string containing the symbol to extract

prefer

preference for any particular type of price, see Details

Details

May be subset by symbol and preference. prefer Preference will be for any commonly used financial time series price description, e.g. 'trade', 'close', 'bid', 'ask' with specific tests and matching for types and column names currently supported in R, but a default grep match will be performed if one of the supported types doesn't match.

The functionality was taken from the quantmod-package