Hello,

I use getSymbols function daily to run some models with stock data. Today
when I tried to update the stock info i get this error

Error in charToDate(x) :
  character string is not in a standard unambiguous format

Sometimes I get it after 2 symbols, other times after 150 symbols, another
time after 40 symbols, then after 203 symbols.

The code for the symbol list is:

lista<-read.csv("lista.csv", header=FALSE)



lista.list.ana<-vector('list',nrow(lista))

names(lista.list.ana) <- lista[,1]

lista.sum<-as.vector(lista[,1])


##actualizar la lista

lista_simbolos<-download_symbols(lista.sum, lista.list.ana)



*The code for the function download_symbols is:*


download_symbols<- function(lista.sum.,lista.list.ana..){

  newnames.<- c("Open", "High", "Low", "Close", "Volume", "Adjusted")

for (m in 1:length(lista.sum.))


{

print(paste(c("Downloading symbol ", lista.sum.[m], ". ", length(lista.sum.
)-m, " symbols missing"), sep="", collapse=""))

temp<-get(loadSymbols(lista.sum.[m]))

names(temp)<-newnames.

#lista.list.ana..[[m]]<-loadSymbols(lista.sum.[m])

lista.list.ana..[[m]]<-temp

}

 return(lista.list.ana..)

}


Is it something wrong with yahoo? I tried google and got another error
Error in `colnames<-`(`*tmp*`, value = c("Open", "High", "Low", "Close",  :
  length of 'dimnames' [2] not equal to array extent

Thanks for your help


-- 
Adolfo Yanes Musetti

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to