[R-SIG-Finance] Determining optional parameters

dae dougedmunds at gmail.com
Tue Jun 5 17:40:45 CEST 2012


Is there a systematic way to determine optional  parameters for a function? 
By optional, I am referring to those which are in the "..." portion of the 
function definition.  

For example, quantmod's getSymbols help file shows this:

getSymbols(Symbols = NULL, 
           env = .GlobalEnv,
           reload.Symbols = FALSE,
           verbose = FALSE,
           warnings = TRUE,
           src = "yahoo",
           symbol.lookup = TRUE,
           auto.assign = TRUE,
           ...)

In /library/blotter/demo/turtles.R,   it uses getSymbols
in this way:

getSymbols(symbols, index.class="POSIXct", from=initDate, source="yahoo")

"symbols" is created earlier in the code:
symbols = c("XLF", "XLP", "XLE")
and due to it's position in the parameter list, is presumably equivalent to: 

getSymbols(Symbols=symbols, index.class="POSIXct", from=initDate,
source="yahoo")

but index.class, from, and source are not in the function definition.  How
do I
systematically explore a function's optional parameters?




--
View this message in context: http://r.789695.n4.nabble.com/Determining-optional-parameters-tp4632413.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list