Por que não estou conseguindo rodar?
symbol<-c("XOM","AAPL", "DIS")
getCSV <- function(symbol){
+ URL <- paste0("http://chartapi.finance.yahoo.com/instrument/1.0/", symbol, "/chartdata;type=quote;range=1d/csv")
+ tab <- read.table(URL, sep = ",", dec = ".", skip = 17)
+ colnames(tab) <- paste(c("timestamp","close","high","low","open","volume"), 1:6, sep = "-")
+ rownames(tab) <- paste(symbol, 1:nrow(tab))
+ SAIDA <- paste0("Dados",symbol,"yahoo20150312.txt")
+ write.table(tab, file = SAIDA, sep = ";", dec = ".", header = T)
+ }
sapply(symbol, getCSV)
Error in write.table(tab, file = SAIDA, sep = ";", dec = ".", header = T) :
unused argument (header = T)