saveSymbols.days: Save data to disk

Description Usage Arguments Details Value See Also Examples

View source: R/saveSymbols.R

Description

Save data to disk the way that getSymbols.FI expects it to be saved.

Usage

1
2
3
4
5
saveSymbols.days(Symbols, base_dir = "", extension = "rda",
  env = .GlobalEnv)

saveSymbols.common(Symbols, base_dir = "", extension = "rda",
  env = .GlobalEnv)

Arguments

Symbols

character vector of names of objects to be saved

base_dir

character. directory in which to store data.

extension

file extension (“rda”)

env

environment that holds the data to be saved (.GlobalEnv by default)

Details

If they do not already exist, subdirectories will be created for each of the Symbols. saveSymbols.common will save a single ‘rda’ file for each of the Symbols in that symbol's subdirectory. saveSymbols.days will split the data up into days and save a separate ‘rda’ file for each day in that symbol's subdirectory.

Value

called for side-effect.

See Also

getSymbols.FI

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
getSymbols("SPY", src='yahoo')
dir.create("tmpdata")
saveSymbols.common("SPY", base_dir="tmpdata")
rm("SPY")
getSymbols("SPY", src='FI', dir="tmpdata", split_method='common')
unlink("tmpdata/SPY", recursive=TRUE)

## End(Not run)

FinancialInstrument documentation built on May 2, 2019, 5:24 p.m.