[R] rmoving dates from an xts object...

akshay kulkarni @k@h@y_e4 @end|ng |rom hotm@||@com
Sun Jul 10 17:41:59 CEST 2022


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]]



More information about the R-help mailing list