I have a dataframe that has a factor list of 'before', 'during' and 'after'. I don't want duplicates of these if there is overlap in the summarize dataframe. So I'd like the code to just assign the first factor in the code and ignore any ones in the group.
Currently I have this code:
group_by(eventID) %>%
summarize(
event = paste(unique(Event)))
However this creates two rows if the eventID overlaps two factors. How can I just get it to paste the first factor? ie. 'before' only not 'during'.
This is what the current code produces. I want there to only be one instance of this rainfall event. which starts and ends at the same time. Instead of producing two rows.