Boa noite, Precisa tirar o argumento header=T que não é válido para write.table(). O equivalente seria col.names=T que já é default.
Éder Comunello <c <[email protected]>[email protected]> Dourados, MS - [22 16.5'S, 54 49'W] Em 15 de março de 2015 19:43, Mauro Sznelwar <[email protected]> escreveu: > 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) > > > > >
_______________________________________________ R-br mailing list [email protected] https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.
