I'm new to r so I'm not sure if I'll ask my own question right but I have a data frame from a study and it provided a data set:
that I trimmed down to what I needed to combine in the picture, I've been trying to find a way to combine each individual(e) and take the mean of each observation(w) so that I'll end up with one row for each individual and the mean of its combined observations. I know how to do this if I do it all separately with
mean(m$`30901`$deltaon)
(m is the original list) but I wanted to find a way so that it goes
mean(m$indivduals[1:40]$deltaon)
so that it will give the means for each. I've been trying to mess with for loops but I cant seem to figure it out.