Hello, everyone

I have the following problem:
Say I have an irregular zoo timeseries like this:

a <- zoo(rep(1:9), as.Date(c("2009-03-20", "2009-03-27", "2009-04-24",
"2009-04-25", "2009-04-30", "2009-05-15", "2009-05-22", "2009-05-29",
"2009-06-26")))

and I have regular zoo timeseries like this:

b <- zoo(rep(1:4), as.Date(c("2009-03-31", "2009-04-30", "2009-05-31",
"2009-06-30")))

>From "a" I need to extract those rows that hold values for the last
day of each month (creating series "c"). Then I have to merge these
values with "b", such that the result has the index of "c".

How could I do this most efficiently?

Thank you in advance!

Best,
Sergey

--
Simplicity is the last step of art./Bruce Lee

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to