Using the result of summarise (dplyr) to mutate the original dataframe
I have a rather big dataframe with a column of POSIXct datetimes (~10yr of hourly data). I would flag all the rows in which the day falls in a Daylight saving period. For example if the Daylight shift starts on '2000-04-02 03:00:00' (DOY=93) i would like that the two previous hours of DOY=93 could be flagged. Although I am a newbie of dplyr I would use this package as much as possible and avoid for-loops as much as possible For example: library(lubridate) sd = ymd('2000-01-01',tz="America/Denver") ed = ymd('2005-12-31',tz="America/Denver") span = data.frame(date=seq(from=sd,to=ed, by="hour"))