Skip to content
Prev 13811 / 15274 Next

Remove first two weeks of data in half hourly resolution

Brian's example is good if you want to remove the first 14 calendar
days.  If you want to remove the first 14 dates that appear in your
data, it's even simpler

    #create sample data
    x <- .xts(1:1000, .POSIXct(1:1000*60*30))
    # remove 1st 14 days by using a negative with first()
    first(x, "-14 days")

Garrett
On Thu, Mar 31, 2016 at 6:24 AM, Brian G. Peterson <brian at braverock.com> wrote: