Re: [R] calculate Euclidean distances between populations in R with this data structure

2014-09-05 Thread David L Carlson
ween populations in R with this data structure I want to calculate Euclidean distance between 12 populations, in each population there are 20 samples and each sample is measured for 100 genes (these are microarray data; the numbers here are just examples). The equation I found is: distance = sqrt{

Re: [R] calculate Euclidean distances between populations in R with this data structure

2014-09-04 Thread Ding, Yuan Chun
R package to do it. Thanks, Ding -Original Message- From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: Thursday, September 04, 2014 4:49 PM To: Ding, Yuan Chun Cc: r-help@R-project.org Subject: Re: [R] calculate Euclidean distances between populations in R with this data structure

Re: [R] calculate Euclidean distances between populations in R with this data structure

2014-09-04 Thread Sarah Goslee
Thanks, > > Ding > > -Original Message- > From: Sarah Goslee [mailto:sarah.gos...@gmail.com] > Sent: Thursday, September 04, 2014 4:49 PM > To: Ding, Yuan Chun > Cc: r-help@R-project.org > Subject: Re: [R] calculate Euclidean distances between populations in R with

Re: [R] calculate Euclidean distances between populations in R with this data structure

2014-09-04 Thread Sarah Goslee
I'd probably start with ?dist Sarah On Thu, Sep 4, 2014 at 4:10 PM, Ding, Yuan Chun wrote: > > > > I want to calculate Euclidean distance between 12 populations, in each > population there are 20 samples and each sample is measured for 100 genes > (these are microarray data; the numbers here a

[R] calculate Euclidean distances between populations in R with this data structure

2014-09-04 Thread Ding, Yuan Chun
I want to calculate Euclidean distance between 12 populations, in each population there are 20 samples and each sample is measured for 100 genes (these are microarray data; the numbers here are just examples). The equation I found is: distance = sqrt{[sum(Average of xi -average of yi)^2] /n },