Perform a right join (or left join if the inputs are reversed):
merge(market, stock, all = c(FALSE, TRUE))
Next time please provide sample data.
Question
I have 2 zoo series one of stock returns and the other of market returns. The thing is that my market return series contains holidays (example: 4 of July) and the stock series doesn't. I want to compare the dates of the 2 series and eliminate the date that is not in my stock series. In that way I would have same length zoo series. In advance thank you very much.
Best, Tom.
Solution
Perform a right join (or left join if the inputs are reversed):
merge(market, stock, all = c(FALSE, TRUE))
Next time please provide sample data.