[R] advanced dist

Martin Klaffenboeck martin.klaffenboeck at inode.at
Tue Jun 1 12:57:44 CEST 2004


Hi there.

I have now found that dist() does what I want in a specific case.

But I have (out of many fields) in my Fragebogen.data file:

Vpn	Code	Family	Test
1	X1	m	45
2	X1	t	58
3	X2	m	44
4	X2	t	43
...

When I now do:
Fbg <- read.table("Fragebogen.data", header=TRUE)
dist(Fbg['Test'])
I have the distances between everyone to everyone.

Now I want to have the mothers (m in Family) at the y axis and the  
daugthers (t) on the x axis, so I have half the size of my distance  
matrix.

Is that possible somehow?

And if possible, I would have the 'Code' at the top to know which  
mother and wich daugther are compared.

Thanks,
Martin




More information about the R-help mailing list