I have a data set with the following structure:
df1 <- data.frame(
session = seq(1,10,1))
df2 <- data.frame(
session = rep(1:10, each=4),
sample = seq(1,40,1))
What I need returned is a df1 with the following structure:
session | sample.list
1 | 1,2,3,4
2 | 5,6,7,8
3 | 9,10,11,12
...
Basically its lists all the samples taken within a given session.
Thanks for any pointers or solutions to solve this.