library(tidyverse)
dta <- tibble(
date = c("2000-01-01", "2000-01-02", "2000-01-03", "2000-01-02","2000-01-03"),
stock = c("A", "A", "A", "B", "B"),
price = c("price_{A1}","price_{A2}","price_{A3}","price_{B1}","price_{B2}" )
)
The data is given in this tibble (code above):
# A tibble: 5 x 3
date stock price
<chr> <chr> <chr>
1 2000-01-01 A price_{A1}
2 2000-01-02 A price_{A2}
3 2000-01-03 A price_{A3}
4 2000-01-02 B price_{B1}
5 2000-01-03 B price_{B2}
I want to exclude row 1, since date 2000-01-01 is not available for all stocks in the tibble.