Re: [R] prop.table on three-way table?

2006-04-20 Thread Marc Schwartz
On Thu, 2006-04-20 at 10:28 +0200, Fredrik Karlsson wrote: > Hi marc, > > I did not manage ctab to do this for me. Again, I am probably using it > wrong, but I don't know that the problem is. > > You asked for a more illustrated example, so here goes: > > Take this table: > > > ftable(table(sam

Re: [R] prop.table on three-way table?

2006-04-20 Thread Fredrik Karlsson
Hi marc, I did not manage ctab to do this for me. Again, I am probably using it wrong, but I don't know that the problem is. You asked for a more illustrated example, so here goes: Take this table: > ftable(table(sample(paste("dim1_no",1:5,sep=""),10,replace=TRUE), sample(paste("dim2_no",1:5,se

Re: [R] prop.table on three-way table?

2006-04-19 Thread Marc Schwartz (via MN)
On Wed, 2006-04-19 at 16:39 +0200, Fredrik Karlsson wrote: > Dear list, > > I am trying to create a three-way table with percent occurrence > instead of raw frequencies. However, I cannot get the results I > expected: > > I have the following table: > > > ftable(table( mannerDF$agem, mannerDF$ta

[R] prop.table on three-way table?

2006-04-19 Thread Fredrik Karlsson
Dear list, I am trying to create a three-way table with percent occurrence instead of raw frequencies. However, I cannot get the results I expected: I have the following table: > ftable(table( mannerDF$agem, mannerDF$target, mannerDF$manner )) 50 bak 0 0 0 0