r - Using Yahoo! database without quantmod functions -


the problem trying solve looping string through r yahoo! finance api. make bunch of data frame files, if convert xts, awesome. however, xts part not important.

library(quantmod) db <- quantmod:::ddb_yahoo()        (i in length(db$db)){   symbols <- db$db[i] #symbols c('aait', 'aal', 'aame', ...   #thousands  url <- "http://ichart.finance.yahoo.com/table.csv?s=symbols" dat[i] <- read.csv(url[i]) dat$date <- as.date(dat$date, "%y-%m-%d") 

i know can't have symbols in ("") quotations, logical purposes.

p.s. instance, not using quantmod functions on purpose.

x<-c('aait', 'aal', 'aame') kk<-lapply(x,function(i) download.file(paste0("http://ichart.finance.yahoo.com/table.csv?s=",i),paste0(i,".csv"))) 

if want directly read file:

jj<- lapply(x,function(i) read.csv(paste0("http://ichart.finance.yahoo.com/table.csv?s=",i))) 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -