I keep getting this error whenever I run the following code:
library(plyr) library(dplyr) library(dplyr, warn.conflicts = FALSE) df8<-df6 %>% mutate(DateTimeUTC = lubridate::mdy_hms(DateTimeUTC), gr = lag(cumsum(!UserIsEditing), default = TRUE)) %>% slice(-c(1, n())) %>% group_by(gr) %>% summarise(Start = min(DateTimeUTC), End = max(DateTimeUTC), Duration = as.integer(End - Start), RowNum = n(), Length = ItemBodyLength[n()]) %>% mutate(RowNum = cumsum(RowNum)) %>% slice(n():1) %>% select(-gr)
I have a large dataset that resembles this:
I have researched this and not sure why this error keeps coming up.
Any help or suggestion is appreciated.