I am fairly new to the Rbbg package, so please excuse any ignorance on my part, however I am wondering if it is possible to pull more than ~25 days of minute bar data using the bar() function. I've found I can't pull more than 25 or 26 days worth of data and am wondering if I am doing something wrong, or if it is just not possible.
Here is the code I am using:
#install.packages("rJava")#install.packages("Rbbg", repos="http://r.findata.org")#install.packages("timeDate")library(rJava)library(Rbbg)library(timeDate)conn <-blpConnect()weekdays =timeSequence(from=(Sys.Date()-38),to =(Sys.Date()-1),by="day")[isWeekday(timeSequence(from=(Sys.Date()-38),to =(Sys.Date()-1),by="day"))]date_time=numeric()volume=numeric()for(i in1:length(weekdays)){start.date <-paste(weekdays[i],"13:30:00.000")end.date <-paste(weekdays[i],"20:00:00.000")raw=bar(conn,"GOOG US Equity","TRADE",start.date,end.date,"1")date_time=append(date_time,raw$time)volume=append(volume,raw$volume)}date.time <-data.frame(do.call('rbind',strsplit(as.character(date_time),'T',fixed=TRUE)))use=data.frame("date"=format(as.Date(date.time$X1),"%m/%d/%Y"),"time"=date.time$X2,"volume"=raw$volume)blpDisconnect(conn)
This works fine and pulls data from the trading days in the past 3.5 weeks. Now, if I try to change the 38 to a greater number in the line weekdays = timeSequence(from = (Sys.Date()-38), to = (Sys.Date()-1), by = "day")[isWeekday(timeSequence(from = (Sys.Date()-38), to = (Sys.Date()-1), by = "day"))], I get the following error: Error in matrix.data[, 1] : subscript out of bounds when I try running the above script.
Is it the case that the API can only pull about 3.5 weeks of minute bar data? Or am I doing something incorrect? Ideally, I would like to have at least 100 trading days worth of data.
Thank you all for your help.
	[[alternative HTML version deleted]]

