Displaying 20 results from an estimated 600 matches similar to: "Euclidean Distance in R"
2012 May 02
3
(no subject)
Hi there I am new to R, and I was hoping you guys could help me out. I
want to make a vector that is: vec(1,2,3,4,5,6,7,8,9,10) and i want to
create a function called PercentileFinder, that if i plug in
PercentileFinder (vec, .9) it will give me 9. Creating the function is my
biggest hurdle please e-mail me back when you all get a chance. Thank you
[[alternative HTML version deleted]]
2012 Nov 18
2
euclidean dist. between matrices
Dear Users,I have two matrices A=15*365 and B=1*365. i want to calculate "Euclidean Distance" between these matrices in such a way that i should have euclidean distance of matrix B against all the columns of matrix A. More precisely, first i want euclidean dist. of column 1 of A against B, then column 2 against B, 3rd column of A against B and so on.is there a way in r to do it?your help
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]]
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,
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.
1999 Jan 20
0
dist(*, "euclidean") [was "dist function suggestion"]
> BDR> You will need to call it something else: dist is a clone of an S
> BDR> function, and dist(X, "manhattan") is well-established usage.
>
> one could still imagine an extra Y argument such that
> dist(X, Y=myY, method="euclidean")
> and dist(X, "euclidean", Y=myY)
> would work
> one could even make it such that
> both
2008 Oct 06
1
easier way to do this without a loop? (successive euclidean distances between points)
a <- c(1:10)
b <- c(.5, .6, .9, 10, .4, 3, 4, 9, 0, 11)
d <- c(21:30)
z <- data.frame(a,b,d)
library(fields)
results <- c()
for(i in 1:(length(rownames(z))-1)){
results[i] <- rdist(z[i,], z[(i+1),])
}
results.1 <- data.frame(results)
f <- rownames(z)
r <- f[-1]
rownames(results.1) <- r
colnames(results.1) <- f[1]
this does what I want it to do - is
2011 Jul 08
1
Visualizing a dissimilarity matrix in Euclidean space
Hi,
I have a set of nodes and a dissimilarity matrix for them, as well as a csv
file in which the diss matrix has been converted to [node_1, node_2,
dissimilarity] format. I would like to visualize this as a graph in
Euclidean space (that is, similar nodes clumped together in clusters),
rather than the seriation visualization given by dissplot(). I am using
Network WorkBench for my
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 May 20
1
finding euclidean proximate points in two datasets
Hello all,
I've been pouring through the various spatial packages, but haven't come
across the right thing yet.
Given a set of points in 2-d space X, i'm trying to find the subset of
points in Y proximate to each point in X. Furthermore, the proximity
threshold of each point in X differs (X$threshold). I've constructed
this myself already, but it's horrificly slow with a
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 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
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
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
2006 May 01
1
OT: 2 x Rails Developer Jobs - Melbourne, Australia
Redbubble is developing a web app where designers, authors,
illustrators, musicians and artists can upload their creative work
for sale to the Australian market. Redbubble takes care of the
logistics ? billing, production, marketing and distribution. We are
looking for 2 developers with experience building clean, elegant and
usable web applications. Toolset will be Rails, CSS, HTML, and
2010 Apr 29
2
Rotating Titles
Hi All,
I am looking for help in rotating species titles produced using the
strat.plot( ) function in the rioja package. This function produces a
stratigraphic plot of paleoenvironmental data. Currently the titles of each
species are plotted vertically while they are typically plotted at a 45
degree angle in other programs. Does anyone have any idea of how to rotates
these titles?
Below is an
2010 Apr 26
2
Cluster analysis: dissimilar results between R and SPSS
Hello everyone!
My data is composed of 277 individuals measured on 8 binary variables
(1=yes, 2=no).
I did two similar cluster analyses, one on SPSS 18.0 and one on R 2.9.2. The
objective is to have the means for each variable per retained cluster.
1) the R analysis ran as followed:
> call data
> dist=dist(data,method="euclidean")
>
2013 May 02
2
Calculating distance matrix for large dataset
Dear R users
I wondered if any of you ever tried to calculate distance matrix with very
large data set, and if anyone out there can confirm this error message I
got actually mean that my data is too large for this task.
negative length vectors are not allowed
My data size and code used
dim(mydata_nor)[1] 365000 144> d <- dist(mydata_nor, method = "euclidean")
Here my
2017 Jun 18
2
dist function in R is very slow
Hi Stefan,
Thank you very much for pointing me to the wordspace package. It does the job a bit faster than my C code but is 100 times more convenient.
By the way, since the tcrossprod function in the Matrix package is so fast, the Euclidean distance can be computed very fast:
euc_dist <- function(m) {mtm <- Matrix::tcrossprod(m); sq <- rowSums(m*m);? sqrt(outer(sq,sq,"+") -
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.