getSymbols.rda: Load Data from R Binary File

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

Description

Downloads Symbols to specified env from local R data file. This method is not to be called directly, instead a call to getSymbols(Symbols,src='rda') will in turn call this method. It is documented for the sole purpose of highlighting the arguments accepted, and to serve as a guide to creating additional getSymbols ‘methods’.

Usage

1
2
3
4
5
6
7
getSymbols.rda(Symbols,
                 env,
                 dir="",
                 return.class = "xts",
                 extension="rda",
                 col.names=c("Open","High","Low","Close","Volume","Adjusted"),
                 ...)

Arguments

Symbols

a character vector specifying the names of each symbol to be loaded

env

where to create objects. (.GlobalEnv)

dir

directory of rda/RData file

return.class

class of returned object

extension

extension of R data file

col.names

data column names

...

additional parameters

Details

Meant to be called internally by getSymbols (see also).

One of a few currently defined methods for loading data for use with quantmod. Essentially a simple wrapper to the underlying R load.

Value

A call to getSymbols.csv will load into the specified environment one object for each Symbol specified, with class defined by return.class. Presently this may be ts, its, zoo, xts, data.frame, or timeSeries.

Author(s)

Jeffrey A. Ryan

See Also

getSymbols, load, setSymbolLookup

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
# All 3 getSymbols calls return the same
# MSFT to the global environment
# The last example is what NOT to do!

## Method #1
getSymbols('MSFT',src='rda')
getSymbols('MSFT',src='RData')


## Method #2
setDefaults(getSymbols,src='rda')
  # OR
setSymbolLookup(MSFT='rda')
  # OR
setSymbolLookup(MSFT=list(src='rda'))

getSymbols('MSFT')

#########################################
##  NOT RECOMMENDED!!!
#########################################
## Method #3
getSymbols.rda('MSFT',verbose=TRUE,env=globalenv())

## End(Not run)

R-Finance/quantmod documentation built on May 8, 2019, 4:49 a.m.