I'm quite new to R, but I cant find the right way to solve my problem.
I have two df's: one on session level and one on client level. In the client level df I want to sum the number of sessions done by a client in the session df.
The df's look like:
df1 df2
Sessionid Client id Clientid
1 1 1
2 1 2
3 2
4 2
5 2
I want output like:
df1 df2
Sessionid Client id Clientid Number_of_sessions
1 1 1 2
2 1 2 3
3 2
4 2
5 2