Displaying 20 results from an estimated 4000 matches similar to: "Euclidean distance function"
2011 Feb 06
2
Subsampling out of site*abundance matrix
Hello,
How can I randomly sample individuals within a sites from a site (row) X
species abundance (column) data frame or matrix? As an example, the matrix
"abund2" made below.
##### (sorry, Im a newbie and this is the only way I know to get an example
on here)
abund1 <- c(150, 300, 0, 360, 150, 300, 0, 240, 150, 0, 60,
0, 150, 0, 540, 0, 0, 300, 0, 240, 300, 300,
2009 Oct 19
1
updating columns using other column as reference
Dear R-gurus,
Just supose I have a dara.frame that looks like
myDF<-read.table(stdin(),head=T,sep=",")
codID,namesp,k1,k2,k3,k4
1,spA,2,5,6,3
2,spB,4,5,4,6
3,spC,2,1,5,6
4,spC,5,4,3,2
5,spD,1,2,3,4
6,spE,2,4,3,1
I need to update the columns k1-k4 with the namesp, but
considering the math between Kx and codID.
My desired output must looks like:
codID,namesp,k1,k2,k3,k4
2007 Oct 23
1
Multivariate regression tree: problems with surrogate splits
R helpers,
I am working with the R program performing multivariate regression trees (MRT). I have a matrix with species and environmental variables saved as a CSV file (sprot_matrix.csv), I have 42 species and 8 environmental variables (SECCHI+PH+TA+PTOT+NTOT+CHLA+AREA+ MEANDEP) for 104 samples
Title
SpA
SpB
SpC
SpD
Varible1
Variable2
Variable3
Sample1
Sample 2
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,
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 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
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.
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 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 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 Apr 13
0
dbFD computing distinct species wrong?
Hi everyone,
I am working with the dbFD function of the FD package, and there's something
funny happening with the value of sing.sp in the output. Basically, I have
a species-function matrix and a community matrix. One site in particular
has 6 species, 4 of which have identical functional coding. I thus expect
nbsp = 6 and sing.sp = 2 for this site. However, nbsp = sing.sp = 6. This
2003 Dec 29
5
include a file ?
ok, I've got yet another newbie question.
My extensions.conf is getting rather longish and I'm getting dizzy
moving back and forth editing this thing. Can I use the include command
to include a file in order to break extensions.conf up into more
manageable pieces ? Is breaking up the extension.conf file an OK thing
to do ?
Maybe something like this:
include
2012 Sep 24
6
Script to count unique values from two linked matricies
I hope you can help with this one.
I have two matricies:
1. A species abundance matrix:
<http://r.789695.n4.nabble.com/file/n4643979/2species_matrix.jpg>
2. A species trait score matrix:
<http://r.789695.n4.nabble.com/file/n4643979/2trait_matrix.jpg>
The trait matrix lists trait scores for each species as listed in the
species abundance matrix.
I would like to create a script
2009 Aug 30
1
about isoMDS method
Hi,
For example:
I built a half matrix "w" using a daisy(x, metric = c("euclidean"))
http://www.nabble.com/file/p25211016/1.jpg
And next I transformed this matrix "w" using isoMDS function, for example
isoMDS(w, k=2) and as result I got:
http://www.nabble.com/file/p25211016/2.jpg
And now I have two questions:
1. If number in matrix w[2, 1] (= 0.41538462) match
2012 Nov 13
2
Discrete trait Ornstein–Uhlenbeck in R?
Is there a package that will allow me to fit Brownian motion and
Ornstein?Uhlenbeck models of evolution for discrete traits? I know that
geiger and ouch have commands for fitting these models for continuous
traits, but these aren't suitable for discrete trait evolution, correct?
--
View this message in context:
2004 Jan 13
7
Parking extension not working
I have the standard parking.conf but extension 700 doesn't show up in my
dialplan.... Why? I can dial 701 which tells me that I don't have any
calls parked there. 700 just gives me invalid extension noise....
Should I have extension 700 defined elsewhere?
Thanks
parking.conf
[general]
parkext =a 700 ; What ext. to dial to park
parkpos => 701-705