estAd: get column containing Price

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/estAd.R

Description

estAd returns values in Adjusted column if it exists, or it's best guess if it doesn't

Usage

1
  estAd(x, symbol = NULL, prefer = NULL)

Arguments

x

xts object

symbol

character string

prefer

for estAd what column to get if none of the defaults can be found.

Details

If prefer is not NULL, estAd will simply call getPrice with symbol and prefer. Otherwise, estAd will look for "adjusted", "close", "mid", "price", "trade", in that order. If and only if those columns cannot be found, symbol will be passed in a call to getPrice

Value

xts object with only one column of prices

Note

case insensitive

Author(s)

Garrett See

See Also

getPrice, Op, Hi, Lo, Cl, Bi, As, Mi, Tr

Examples

1
2
3
4
5
## Not run: 
getSymbols('SPY')
estAd(SPY)

## End(Not run)

qmao documentation built on May 2, 2019, 4:54 p.m.