search for: dayend

Displaying 1 result from an estimated 1 matches for "dayend".

Did you mean: datend
2011 Aug 23
0
Ideas for tricky subset of XTS object
...,000 entries over 1 year time. I would like to subset a specific piece, by "number of days" not a specific date. The way I do it now is awkward. Would love to find a way to do this easier to generate a new object just containing the days I want. --------------------------------------- dayEnds <- endpoints(dataset, on="days") datasetEnd <- max(dayEnds) for( d in 1:ndays(dataset)){ day <- dataset[ (dayEnds[d]+1):dayEnds[d+1], ] daysToEnd <- round(as.numeric( index(dataset[datasetEnd]) - index(tail(day, n=1)) , unit="days" )) if(daysToEnd > 30|| da...