I am currently understanding to use R for data cleaning and arranging purposes. I have a dataframe that looks like this:
Id Shopping_date_1 Shopping_date_2 Shopping_date_3
1 01/05/2018 01/25/2018 NA
2 02/06/2019 NA NA
3 08/05/2018 NA 01/04/2019
I want to arrange the dataframe such that i get a column that can count number of times a user has shopped something like this:
Id Shopping_date_1 Shopping_date_2 Shopping_date_3 Shop_count
1 01/05/2018 01/25/2018 NA 2
2 02/06/2019 NA NA 1
3 08/05/2018 NA 01/04/2019 2
Please help!