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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top