Skip to content
Prev 171030 / 398503 Next

table with 3 variables

Maybe reshape will help you, but I'm in doubt that your posted desired 
result fits your given data - e.g shouldn't  subject 101 Q3 give "Y"?

xx<-data.frame(Subject=rep(100:101, each=4), 
Quarter=rep(paste("Q",1:4,sep=""),2), Boolean = rep(c("Y","N"),4))
reshape(xx,timevar="Quarter",idvar="Subject",direction="wide",v.names="Boolean")

hth.

Pascal Candolfi schrieb: