Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 445

Creating new variable under dplyr based on similar values in many columns

$
0
0

I have a dataset where multiple individuals attended 6 events. Dataset looks somewhat as follows:

Series  event_1    event_2  event_3  event_4  event_5  event_6  1      Bill       Alicia   Alicia   Bill     Denise   Bill  2      Will       Stormy    Bill    Dob       June    Denise  3      Stormy      Dave     Sally   Denise    Alicia   April

I want to create a new variable based on which of these participants attended many events no matter which series. So for instant Bill attended 4 times and Alicia attended three times and Denise attended 3 times as well. So there were at least 2 participants who attended 3 events and one participant who attended 4 times.

Could you help me with the best way of go about this?

Thanks


Viewing all articles
Browse latest Browse all 445

Trending Articles



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