similar to: Calculating distance matrix for large dataset

Displaying 20 results from an estimated 7000 matches similar to: "Calculating distance matrix for large dataset"

2018 Mar 15
3
stats 'dist' euclidean distance calculation
Hello, I am working with a matrix of multilocus genotypes for ~180 individual snail samples, with substantial missing data. I am trying to calculate the pairwise genetic distance between individuals using the stats package 'dist' function, using euclidean distance. I took a subset of this dataset (3 samples x 3 loci) to test how euclidean distance is calculated: 3x3 subset used
2008 Oct 01
3
for loop question Documentation and its application for calculating euclidean distance on MDS ordination axis scores
?for doesn't return anything help.search("for") doesn't return anything- Is the for loop so prevelant in computer programing that the documentation is implicit or is R paradigm to discourage the use of the for loop. I will post data probably tonight, but here is my problem. I have preformed an MDS on a set of data. I have the scores of the four axes that are the optimal
2008 Feb 19
1
Calculating the distance samples using distance metics method
***********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
2012 Aug 24
3
Euclidean distance function
Hi, I should preface this problem with a statement that although I am sure this is a really easy function to write, I have tried and failed to get my head around writing functions in R. I can use R where functions exist to do what I want done, but have found myself completely incapable of writing them myself. The problem is that I have a table with several rows of species and several columns of
2011 Jul 06
1
relative euclidean distance
Hi, I would like to calculate the RELATIVE euclidean distance. Is there a function in R which does it ? (I calculated the abundance of 94 chemical compounds in secretion of several individuals, and I would like to have the chemical distance between 2 individuals as expressed by the relative euclidean distance. Some compounds are in very low abundance whereas others are in high abundance,
2018 Mar 15
0
stats 'dist' euclidean distance calculation
> 3x3 subset used > Locus1 Locus2 Locus3 > Samp1 GG <NA> GG > Samp2 AG CA GA > Samp3 AG CA GG > > The euclidean distance function is defined as: sqrt(sum((x_i - y_i)^2)) My > assumption was that the difference between
2010 Jun 24
2
Euclidean Distance Matrix Analysis (EDMA) in R?
I am studying on statistical shape analysis, I wonder is there any way or package available that I can perform Euclidean Distance Matrix Analysis (EDMA I or EDMA II) in R... thanks Gokhan -- View this message in context: http://r.789695.n4.nabble.com/Euclidean-Distance-Matrix-Analysis-EDMA-in-R-tp2266797p2266797.html Sent from the R help mailing list archive at Nabble.com.
2009 Oct 21
2
squared euclidean distance
Dear R-Help-Team, I would like to cluster my data using the ward-method. In several papers I read (e.g. Bahrenberg) that it is neccesary to use the "squared euclidean distance" with the ward-method. Unfortunatelly I cannot find this term in r as a method for measuring the distance. Does anybody have an idea? Thanks in advance, Carolin [[alternative HTML version deleted]]
2004 Feb 24
3
Calculate Distance and Aggregate Data?
Hi all, I've been struggling learning R and need to turn to the list again. I've got a dataset (comma-delimited file) with the following fields: recid, latitude, longitude, population, dwelling and age. For each observation, I'd like to calculate the total number of people and dwellings and average age within 2 k.m. Distance could be Euclidean, however, a proper distance
2008 Jan 31
3
fastest way to compute the squared Euclidean distance between two vectors in R
I have a program which needs to compute squared Euclidean distance between two vectors million of times, which the Rprof shows is the bottleneck. I wondered if there is any faster way than my own simple function distance2 = function(x1, x2) { temp = x1-x2 sum(temp*temp) } I have searched the R-help archives and can not find anything except when the arguments are matrices. Thanks for any
2011 Apr 05
2
Euclidean Distance in R
Hi 1. I have two raster files *.asc (identical size) 2. The data in each contain presence or absence data in each cell represented by a 1 or 0 respectively 3. I would like to take the location of each 1 (presence cell) in raster file 1 and measure the euclidean distance to the nearest 1 (presence cell) in raster file 2. Obviously in some cases there will be overlap so the distance will be zero.
2008 Apr 27
1
An ANOVA test that uses a distance matrix like hierarchical cluster analysis?
Hi All, I have a question which does not pertain directly to the use of R but comes from my use of R! I have data which can be described as 3-dimensional e.g. (x,y,z), with no negative component. The suggested way to analyze this data is via multivariate techniques or by calculating what amounts to a levene's test on the data and then an ANOVA on the three components if the first test is
2004 Sep 12
2
mahalanobis distance
Is there a function that calculate the mahalanobis distance in R . The dist function calculates "euclidean"', '"maximum"', '"manhattan"', '"canberra"', '"binary"' or '"minkowski"'. Thanks ../Murli
2004 Nov 09
1
gdist and gower distance
Dear All, I would like to ask clarifications on the gower distnce matrix calculated by the function gdistin the library mvpart. Here is a dummy example: > library(mvpart) Loading required package: survival Loading required package: splines mvpart package loaded: extends rpart to include multivariate and distance-based partitioning > x=matrix(1:6, byrow=T, ncol=2) > x [,1]
2004 Jan 21
1
outlier identification: is there a redundancy-invariant substitution for mahalanobis distances?
Dear R-experts, Searching the help archives I found a recommendation to do multivariate outlier identification by mahalanobis distances based on a robustly estimated covariance matrix and compare the resulting distances to a chi^2-distribution with p (number of your variables) degrees of freedom. I understand that compared to euclidean distances this has the advantage of being scale-invariant.
2008 Aug 27
2
r function for calculating extreme spread in group
I'm trying to figure out how to write a r function that will calculate the extreme spread of a group of points given their (x,y) coordinates. Extreme Spread is the maximal Euclidean distance between two points in a group ex.spread = max{ sqrt [ (xi-xj)^2 - (yi-yj)^2 ] } for i not equal to j I have 60 levels to apply this to. There is the combination function in the dprep package but
2004 Feb 25
4
Computing very large distance matrix
Hello All, I have a 131072x132 matrix for which I need to compute a regular euclidean distance matrix, which I then need to transform and run agnes() on this transformed matrix. I am having trouble computing the distance matrix as it is fairly large and I am sure I have gone over the max. The specific error I am getting is: Error in vector("double", length) : negative length vectors
2011 Aug 08
3
Distance between a vector and matrix rows
I am trying to find the distance between a vector and each row of a dataframe. I am using the function "distancevector" in the package "hopach" as follows: mydata<-as.data.frame(matrix(c(1,1,1,1,0,1,1,1,1,0),nrow=2)) V1 V2 V3 V4 V5 1 1 1 0 1 1 2 1 1 1 1 0 vec <- c(1,1,1,1,1) d2<-distancevector(mydata,vec,d="euclid") The Euclidean distance
2006 Jan 11
1
F-test degree of freedoms in lme4 ?
I have a problem moving from multistratum aov analysis to lmer. My dataset has observations of ampl at 4 levels of gapf and 2 levels of bl on 6 subjects levels VP, with 2 replicates wg each, and is balanced. Here is the summary of this set with aov: >> summary(aov(ampl~gapf*bl+Error(VP/(bl*gapf)),hframe2)) > >Error: VP > Df Sum Sq Mean Sq F value Pr(>F) >Residuals
2011 Oct 03
4
distance coefficient for amatrix with ngative valus
Hi, I need to run a PCoA (PCO) for a data set wich has both positive and negative values for variables. I  could not find any distancecoefficient other than euclidean distace running for the data set. Are there any other coefficient works with negtive values.Also I cannot get summary out put (the eigen values) for PCO as for PCA.   Thanks. Dilshan [[alternative HTML version deleted]]