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