No. Not really.What you have done seems to be similar to what I could do
with the reshape library.
rawer<-melt(coinfection,id.var="study") # please refer to my post
immediately before this.
I am still unable to make use of prop.table and margin.table functions.


On 10/3/07, Deepayan Sarkar <deepayan.sarkar@gmail.com> wrote:
>
> On 10/3/07, Farrel Buchinsky <fjbuch@gmail.com> wrote:
> > Your solution would work if the data frame contained the raw data. In
> that
> > case the table function as you outlined would be a table crossing all
> the
> > levels of column 1 with all the levels of column 2.
> > Instead my data frame is the table. It is an aggregate table (I may be
> using
> > the wrong buzzwords here).
>
> Does this help:
>
> > foo <- Titanic[,2,2,]
> > foo
>       Survived
> Class  No Yes
>   1st   4 140
>   2nd  13  80
>   3rd  89  76
>   Crew  3  20
> > bar <- as.data.frame.table(foo)
> > bar
>   Class Survived Freq
> 1   1st       No    4
> 2   2nd       No   13
> 3   3rd       No   89
> 4  Crew       No    3
> 5   1st      Yes  140
> 6   2nd      Yes   80
> 7   3rd      Yes   76
> 8  Crew      Yes   20
> > xtabs(Freq ~ Class + Survived, data = bar) # compare with foo
>       Survived
> Class   No Yes
>   1st    4 140
>   2nd   13  80
>   3rd   89  76
>   Crew   3  20
>
> -Deepayan
>



-- 
Farrel Buchinsky
GrandCentral Tel: (412) 567-7870

	[[alternative HTML version deleted]]

