Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(dplyr)
- dat<-data.frame(S=c(rep(1,8),rep(2,6)),
- A=c(rep("L",4),rep("R",4),rep("L",4),rep("R",2)),
- B=c(rep(c("pic","pic","word","word"),3),"pic","pic"),
- Y=c(1234,1883,732,273,1843,1362,321,234,2983,1283,321,532,2492,2182))
- dat %>% group_by(S,A,B) %>% summarise(mean(Y))->answer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement