Skip to content

Quantmod Yahoo ticker download error

2 messages · Isak Engdahl, Joshua Ulrich

#
Hello Erol,

Thank your for your help!

When I run it with lenght I get the below error:

*Error in symbols[i, ] : incorrect number of dimensions*
*> *

Any ideas?

//Isak

# Loop through each symbol
nrow(symbols)
for (i in 1:length(symbols)){
  symbol <- symbols[i,]$Symbol
  df = data.frame(Date=index(get(symbol)), coredata(get(symbol)))
  setNames(df,c("Date","Open","High","Low","Close","Volume","Adjusted"))

  if(dbExistsTable(con, symbol)){
    dbRemoveTable(con, symbol)
  }
  dbWriteTable(con, name=symbol, value=df, row.names=FALSE, overwrite =
TRUE)
}



On Tue, Feb 24, 2015 at 4:10 PM, Erol Biceroglu <EBiceroglu at optrust.com>
wrote:

  
    
#
On Tue, Feb 24, 2015 at 9:16 AM, Isak Engdahl <isak.engdahl at gmail.com> wrote:
Read "An Introduction to R".  Your issue is the lack of a basic
understanding of core R data structures.  This is not the correct
forum to ask for help with this type of issue.  As the footer on every
message sent to this list says, in part, "Also note that this is not
the r-help list where general R questions should go."
<snip>