Re: [R] ftable and data.frame

2013-12-20 Thread David Winsemius
On Dec 20, 2013, at 5:01 AM, wrote: > Hi, > > I used this command to produce a table: It's not actually a 'table'. > > (tab1 = ftable(SEX, ESTCIV, Q1)) is.table(tab1) # will return FALSE > > Q1 B L M N > SEXOESTCIV >F A 11 13

Re: [R] ftable and data.frame

2013-12-20 Thread arun
Hi, Try: library(reshape2) dcast(as.data.frame(tab1), SEX+ESTCIV~Q1,value.var="Freq") ##not tested. A.K. On Friday, December 20, 2013 8:03 AM, "silv...@uel.br" wrote: Hi, I used this command to produce a table: (tab1 = ftable(SEX, ESTCIV, Q1))                               Q1  B  L  M  N

Re: [R] ftable and data.frame

2013-12-20 Thread John Kane
What does your original data look like? I seems to me that it would be better to give us that information since you may not want to use ftable() at all. Ideally you should give us the original data or a sample of it. If it's confidential just replace the actual values with fake data. The struct