gsa: Get, Subset, Assign

Description Usage Arguments Details Author(s) See Also Examples

View source: R/gsa.R

Description

Get data from environment, subset the data, and re-assign it.

Usage

1
2
  gsa(Symbols, subset = "T08:30/T15:00", env = .GlobalEnv,
    store.to = env, invisible = FALSE)

Arguments

Symbols

names of xts objects

subset

xts style subetting string. ("T08:30/T15:00")

env

environment where data is stored (.GlobalEnv)

store.to

environment in which to store the subsetted data. By default it is the same as env

invisible

TRUE/FALSE. If true, nothing is returned, otherwise, the name of symbols that were subset will be returned

Details

Primarily intended to remove data from outside of regular trading hours. However, can be used for any xts style subsetting.

Author(s)

Garrett See

See Also

gaa, alignSymbols, PF

Examples

1
2
3
4
5
6
7
## Not run: 
getSymbols('SPY', from='2011-01-01', to='2011-06-01', src='yahoo')
tail(SPY)
gsa("SPY","::2011-04-15")
tail(SPY)

## End(Not run)

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