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.

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top