Re: [R] Joining two (or more) frequency tables

2010-05-19 Thread Wu Gong
> ## Create a sample data. > data <- data.frame(father.id = letters[1:5], + diagnosis = sample(c(100,200,300,340),5,replace=TRUE), + diagnosis1 = sample(c(100,200,300,340),5,replace=TRUE), + diagnosis2 = sample(c(100,200,300,340),5,replace=TRUE)) > data father.id diagnosis diagnosis1 diagnosis2

Re: [R] Joining two (or more) frequency tables

2010-05-19 Thread jim holtman
use the 'reshape package: > require(reshape) Loading required package: reshape Loading required package: plyr > x father.id diagnosis diagnosis2 diagnosis3 1 a 100200300 2 b 200100340 > melt(x) Using father.id as id variables father.

[R] Joining two (or more) frequency tables

2010-05-19 Thread Jan . Sunde
Hi, I am still new to R and have, in spite of searching all over, found no "understandable" documentation for how to join two (or more) frequency tables. Why would I want to do that and what do I mean by "joining" ? Let me try to explain: I have a diagnosis form that allows registration of up t