[R] Building Distance Matrix

2010-06-30 Thread cs
Dear All, I tried to build a distance matrix. The following example is using dis fucntion: a<- 1:100 grid <- as.matrix(expand.grid(a,a)) dis<-as.matrix(dist(grid)) This can create a 1 x 1 distance matrix, and the object size is about 764Mb. However, the actual usage of this operation is

[R] Fwd: Extract element of a list based on an index value

2011-06-24 Thread CS Sparks
Dear list, I have some data on a geneaology, here is a subset: warmerge[1:11,c(1,6,25)] Warrior SibID birth.year 11003793 2013 1926 4 2013 2024 1934 10943769 2024 1918 632 2747 2037 1928 176 2083 2039 1944 187 2085 2039 1949