similar to: NAs introduced by coercion in dist()

Displaying 20 results from an estimated 1000 matches similar to: "NAs introduced by coercion in dist()"

2007 May 25
1
Problem with rpart
I work on Windows, R version 2.4.1. I'm very new with R! I am trying to build a classification tree using rpart but, although the matrix has 108 variables, the program builds a tree with only one split using one variable! I know it is probable that only one variable is informative, but I think it's unlikely. I was wondering if someone can help me identify if I'm doing something
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
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,"+") -
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
2007 Sep 02
1
buglet in dist() ?
the first line of dist() says if (!is.na(pmatch(method, "euclidian"))) shouldn't that be "euclidean" ? --------------------- R version 2.5.1 (2007-06-27) i486-pc-linux-gnu locale:
2011 Mar 18
3
exploring dist()
Hello, everybody, I hope somebody could help me with a dist() function. I have a data frame of size 2*4087 (col*row), where col corresponds to the treatment and rows are species, values are Hellinger distances, I should reconstruct a distance matrix with a dist() function. I know that "euclidean" method should be used. When I type: dist(dframe,"euclidean") it gives me a
2008 Dec 30
1
why stress value remains so high after invoking of metaMDS
Hello everyone! metaMDS(cm, distance = "euclidean", k = 2, trymax = 50, autotransform =TRUE, trace = 1, plot = T) (cm is a similarity matrix, in which values are positive integers or 0) I use this command to run NMDS on my matrix "cm". But the stress is very high after analysis. About 14. Actually, there is no improvment comparing with using isoMDS.
2007 Apr 25
1
dist label names
Hello, I am trying to do a multi-dimensional scaling of the World Bank's quality of governance indicators for the Balkan region. I am having trouble labelling my plot. Could some kind person help me out. How do I set the attribute Label by a variable (say, "Code")? At present I get this: >qog.dist<-dist(Balkans.data, method = "euclidean", diag = FALSE, upper =
2002 Oct 21
1
dist() {"mva" package} bug: treats +/- Inf as NA
Vince Carey found this (thank you!). Since the fix to the problem is not entirely obvious, I post this to R-devel as RFC: help(dist) says: >> Missing values are allowed, and are excluded from all computations >> involving the rows within which they occur. If some columns are >> excluded in calculating a Euclidean, Manhattan or Canberra >> distance, the sum is
2004 May 13
2
BIO-ENV procedure
I've been unable to find a R package that provides the means of performing Clarke & Ainsworth's BIO-ENV procedure or something comparable. Briefly, they describe a method for comparing two separate sample ordinations, one from species data and the second from environmental data. The analysis includes selection of the 'best' subset of environmental variables for explaining
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 05
2
custom metric for dist for use with hclust/kmeans
Hi guys, I've been using the kmeans and hclust functions for some time now and was wondering if I could specify a custom metric when passing my data frame into hclust as a distance matrix. Actually, kmeans doesn't even take a distance matrix; it takes the data frame directly. I was wondering if there's a way or if there's a package that lets you create distance matrices from
2007 Aug 24
1
Adding new points to a metaMDS ordination ("vegan" pkg)
Hi, I've been using R for a while now but I've got a problem with metaMDS (in the vegan package) that I can't quite figure out. I have a set of proportion data (from 0-1, rows sum to 1) that I apply metaMDS to using the command: nMDS.set=metaMDS(sqrt(test.set),distance="euclidean",k=3,zerodist="add",autotransform=FALSE) I am using a squared-chord distance
2008 Aug 21
1
[dist]how to analise a large matrix?
Hi all, I have a matrix of about 100.000?x 4?that I need?to classify using euclidean metric. For that I am using dist?or daisy functions, but I am afraid that the message: Error in vector("double", length) : vector size specified is too large, means too much lines. Can anyone suggest me how should I analyse this matrix? Thanks in advance, Diogo Andr? Alagador MNCN,CSIC, Madrid, Spain
2013 Jul 18
1
binary distance measure of the "dist" function in the "stats" package
Dear all: I want to ask question about "binary" distance measure. As far as I know, there are many binary distance measures,eg, binary Jarcad distance, binary euclidean distance, and binary Bray-Curtis distance,etc. It is even more confusing because many have more than one name. So , I wan to know what the definite name of the binary distance measure of the "dist" function
2002 Dec 19
1
newbie question on dist
hi, i have just begun using R, so please bear with me. i am trying to use cmdscale and display the result. i read the data using read.table(), calculate the proximity matrix using dist() and the display the result using the cmdscale(). this is very fine. in addition, i want the display to distinguish between two classes of records in my data. i have my data records marked as "1" or
1999 Jan 20
2
dist function suggestion
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-162216788-916833047=:29339 Content-Type: TEXT/PLAIN; charset=US-ASCII On my R installation (0.62.4) there is no dist() function, so I attach one possibility. It provides
2004 Jan 06
2
dist(x,y)
Hi Ryszard! There is a dist function in R. It's in the mva package. You can set the kind of distance that you want. Thanks, Erin mailto:hodgess at gator.uhd.edu
2007 May 11
3
how to get column/row info from a dist object?
Dear R users; Is it possible to get the row and column number of a particular entry in a dist object? Let's say that I want to find the position of the value 1.1837 (the last entry on the dist object below), that is [6,3]. Can I get those values without transforming the object to a matrix?, i.e. working with the dist object only. 1 2 3 2 0.23935864
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