Advertisement
Guest User

Untitled

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