I would like to count the largest number of consecutive days where my variable is above 50. My dataset is like :
dp <- dput(head(df, 20))
dp = structure(list(day = 1:20, month = c(1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), year = c(1990L,
1990L, 1990L, 1990L, 1990L, 1990L, 1990L, 1990L, 1990L, 1990L,
1990L, 1990L, 1990L, 1990L, 1990L, 1990L, 1990L, 1990L, 1990L,
1990L), variable = c(46.8, 51.3, 51.2, 51.9, 51.4, 50.9, 51.4,
51.6, 51.5, 49.9, 49.4, 49.1, 51.7, 51.8, 50.9, 51, 51.9, 52.5,
52.5, 49.1)), .Names = c("day", "month", "year", "variable"), row.names = c(NA,
20L), class = "data.frame")
Thanks a lot in advance