For this file:
dat=structure(list(V1 = c("1901-01-16", "1901-01-16", "1901-02-15",
"1901-02-15", "1901-03-16", "1901-03-16"), V4 = c(12.5, 10, 13.1,
30, 12.8, 5)), row.names = c(NA, 6L), class = "data.frame")
I would like to remove the rows 2,4,6,8, until the end and replace whatever after 1901-01- by 01 output:
1901-01-01 12.5
1901-02-01 13.1
1901-03-01 12.8