Re: [R] Setting a contingency table

2009-01-10 Thread David Winsemius
library(gmodels) ?CrossTable# by Marc Schwartz a<-67; b<-10; c<-79; d<-67; > dft<- with(as.data.frame.table(as.table(c(a=77,b=10,c=79,d=67))), data.frame(Var1 = rep(Var1,Freq)) ) There are probably more efficient ways to replicate entries. I am just drawing a blank right now.

[R] Setting a contingency table

2009-01-10 Thread Bhargab Chattopadhyay
Hi, I want to set a make a contingency table which will look like this.. The problem is that I can't  set the table like the following. col1 col2   Total     row1  a b n10 rp1   rp2    100