Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

R Group Data, determine duplicates, update column on the earliest instance

$
0
0

I'm needing some help to determine if a 'title' has ever been 'registered' and if so, update a separate column with the earliest date in for that title with text - "InsinuatedRegistered".

I've tried a bunch of things but don't know how to select only the earliest item to add the text to.

try:

listin %>% group_by(title, Action_updated=="Registration") %>% summarise(Count = n()) %>% ungroup() %>% mutate(Action_updated = "InsinuatedRegistered") 

enter image description here


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>