Message-ID: <CAGxFJbR2Q8XuVW3-MsbmCNBauvh+xRuDSB_rL=2Fm04rWgGYhw@mail.gmail.com>
Date: 2022-07-10T16:35:42Z
From: Bert Gunter
Subject: rmoving dates from an xts object...
In-Reply-To: <PU4P216MB1568885A7CD531D6620DC8CDC8849@PU4P216MB1568.KORP216.PROD.OUTLOOK.COM>
Time to do your homework:
https://rpubs.com/odenipinedo/manipulating-time-series-data-with-xts-and-zoo-in-R
Bert
On Sun, Jul 10, 2022, 6:42 PM akshay kulkarni <akshay_e4 at hotmail.com> wrote:
> Dear members,
> I have OHLC data of 500 stocks: OHLCData and
> dates. These are of xts object. I want to do the following:
>
>
> 1. I want to remove a contiguous set of dates from the xts object. for
> example, I want to remove data from the OHLC data from "2022-20-7"
> 2. to "2018-2-2", continuously.
> 3.
>
> 2. I want to remove a set of dates, which are not contiguous.
>
> Any idea on how to accomplish it? I can write an intricate for loop, but
> any other method? Does an xts object behave like an atomic vector :
> OHLCData[[i]][-dates[[i]]] ?
>
> Many thanks in advance....
>
> THanking you,
> Yours sincerely,
> AKSHAY M KULKARNI
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]