I want to divide one series "x1" tail listed below by a second series "x2",
but the dates are not aligned, even though the start and end dates are the
same (I get a positions different error).  If I align them by days,
duplicate dates appear to fill in between monthly values.  Should I use
aggregate() to reconfigure the monthly series?  If so, which value of the
aggregate() argument FUN should I use to list only the last day of the month
(obviously not mean or sum)?    Thanks much for any help.

 

Unaligned series:

 

> tail(x1)

GMT

           WILL5000IND

2010-07-31    16421.36

2010-08-31    16509.87

2010-10-01    17094.89  <- out of sequence (Friday)

2010-10-31    17881.22

2010-12-01    18349.44

2010-12-31    19099.87 <- out of sequence

 

> tail(x2)

GMT

               TS.1

2010-07-31 14632.61

2010-08-31 14689.75

2010-09-30 14745.52

2010-10-31 14794.91

2010-11-30 14834.44

2010-12-31 14861.00

 

Aligned series:

 

> tail(x1a)

GMT

           WILL5000IND

2010-12-24    18349.44

2010-12-27    18349.44

2010-12-28    18349.44

2010-12-29    18349.44

2010-12-30    18349.44    <-Should be 2010-11-30, delete dates up to here in
this list

2010-12-31    19099.87 

 

> tail(x2a)

GMT

               TS.1

2010-12-24 14834.44

2010-12-27 14834.44

2010-12-28 14834.44

2010-12-29 14834.44

2010-12-30 14834.44

2010-12-31 14861.00

 

 


        [[alternative HTML version deleted]]

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to