Skip to content
Prev 299829 / 398503 Next

Getting objects from quantmod ticker list

On Wed, Jul 11, 2012 at 1:49 PM, Cren <oscar.soppelsa at bancaakros.it> wrote:
I think you need

do.call(rbind, as.list(eapply(data, function(x) Cl(to.weekly(x)))))

Working from the inside out:

to.weekly -- go to weekly frequency
Cl -- take the close
eapply -- do this to each element of the data environment
as.list -- convert to list
do.call(cbind, ...) -- put them all together.

Though there may be something simpler.

Best,
Michael