I am trying take the mean of a list of columns in R and am running into a issue. Let's say I have:
A B C D
1 2 3 4
5 6 7 8
9 10 11 12
What I am trying to do is take the mean of columns c(A,C) and save it as a value say (E) as well as the mean of columns c(B,D) and have it save as a different value say F. Is that possible?
E F
2 3
6 7
10 11