0
group1.raw <- merge(tic1[1], getYahooData(i, 20130301, 20160301, adjust = TRUE)[,"Close"])} 
colnames(group1.raw) <- c("tic1") 
group1.aggregated <- xts(group1.raw%%(1 / as.vector(group1.raw [, "20130301"])), 
    order.by <- index(group1.raw)) 
group1.port <- diff(log(group1.aggregated))       

R keeps giving me this

Error in `[.data.frame`(group1.raw, , "20130301") :    undefined columns selected 

What have I missed?

Vincent Bonhomme
  • 7,235
  • 2
  • 27
  • 38
  • This post does not include a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Jthorpe Mar 30 '16 at 04:11
  • The error is R's way of saying that the column `"20130301"` does not exist in this call `group1.raw [, "20130301"]`. – Jthorpe Mar 30 '16 at 04:13
  • Also, are you sure in line 1 you want `merge(tic1[1]` and not `merge(tic1[,1]` , i.e., the first column , and not just the first element/row ? – R.S. Mar 30 '16 at 04:30

0 Answers0