r - Specify function parameters in do.call -
lets have function fetches data yahoo called yahoo.fetch, , run do.call on function, be:
do.call(merge.xts, lapply(list.of.tickers, yahoo.fetch)) the default have all=true in merge.xts, how able specify in do.call have all=false? example, know how change , specify parameters in apply, do.call, lapply functions.
you can add named value existing list c() returns list:
do.call(merge.xts, c( lapply(list.of.tickers, yahoo.fetch), all=false )) or wrap parameter in anonymous helper function:
do.call( function(x) merge.xts(x, all=false), lapply(list.of.tickers, yahoo.fetch))
Comments
Post a Comment