[R] Calculating the distance samples using distance metics method

From: Keizer_71 <christophe.lo_at_gmail.com>
Date: Tue, 19 Feb 2008 15:34:33 -0800 (PST)

***********reading in data**********

data<-read.table("microarray.txt",header=T, sep="\t")

head(data)

dim(data)

attach(data)

***********creating matrix and calculating variance across probesets********

x<-1:20000

y<-2:141

data.matrix<-data.matrix(data[,y])

variableprobe<-apply(data.matrix[x,],1,var)

hist(variableprobe)

**************filter out low variance*************

data.sub = data.matrix[order(variableprobe,decreasing=TRUE),][1:10000,]

dim(data.sub)
[1] 10000 140

What is the best way to calculate the distances between the samples using the euclidean or manhattan distance metrics?

any suggestions?

-- 
View this message in context: http://www.nabble.com/Calculating-the-distance-samples-using-distance-metics-method-tp15578860p15578860.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 19 Feb 2008 - 23:38:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 20 Feb 2008 - 00:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive