[R] Calculating the distance samples using distance metics method

Keizer_71 christophe.lo at gmail.com
Wed Feb 20 00:34:33 CET 2008


***********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.



More information about the R-help mailing list