As the result of kmean clustering I assigned persons to different clusters over several years. See the code for a small example.
df <- data.frame( personID =