rMetrics
I am trying to download data off Yahoo finance utilizing the rMetrics packages but all the example code including several other examples found in the rMetrics PDFs fail. After a successful download of the data i get the following error message: trying URL 'http://chart.yahoo.com/table.csv?s=^DJI&a=0&b=1&c=1999&d=11&e=31&f=2000&x=.csv' Content type 'text/csv' length unknown opened URL downloaded 31Kb Read 504 items Read 7 items Error in if (sum(lt$sec + lt$min + lt$hour) == 0) isoFormat = "%Y-%m-%d" : missing value where TRUE/FALSE needed The .R code i am trying run looks like this (it's from the demo suite): # Settings: symbol = "^DJI" file = "DJI.CSV" source = "http://chart.yahoo.com/table.csv?" # 1.1.1999 - 31.12.2000 # Note months count from 0 to 11 ! query = paste("s=", symbol,"&a=0&b=1&c=1999&d=11&e=31&f=2000&x=.csv", sep = "") ### # Download: DJI = yahooImport(query, file, source, try = TRUE) head(DJI at data) ### # Direct data access as.timeSeries Object: DJI = as.timeSeries(yahooImport(query, file, source, try = TRUE)@data) class(DJI) head(DJI) tail(DJI) ###
View this message in context: http://www.nabble.com/rMetrics-tf2943492.html#a8230851 Sent from the Rmetrics mailing list archive at Nabble.com.