search for: ex_dist

Displaying 1 result from an estimated 1 matches for "ex_dist".

2008 Jul 15
1
manipulating (extracting) data from distance matrices
...n figure out which elements to query and stick them together using c(). However, all this stuff is still indexed by the "labels" attribute. Does anyone know of a way to use that to pull out subsets from the distance matrix in a simpler manner than my example code below? ############## # ex_dist.R # example for # manipulating # distance matrices #################### set.seed<-12345 a<-sample(20:40, 10) b<-sample(80:100, 10) c<-sample(0:40, 10) dat<-data.frame(a,b,c) dat dmat<-dist(dat, method="euclidean") dmat dmat[1:6] #vector that stores the distance matr...