Re: [Rd] dist function in R is very slow

2017-06-18 Thread Moshe Olshansky via R-devel
with FFT - I am not sure). Once again, thank you very much for your comments and help. From: Stefan Evert To: Moshe Olshansky Cc: R-devel Mailing List Sent: Monday, 19 June 2017, 2:23 Subject: Re: [Rd] dist function in R is very slow > By the way, since the tcrossprod funct

Re: [Rd] dist function in R is very slow

2017-06-18 Thread Stefan Evert
> By the way, since the tcrossprod function in the Matrix package is so fast, > the Euclidean distance can be computed very fast: Indeed. > euc_dist <- function(m) {mtm <- Matrix::tcrossprod(m); sq <- rowSums(m*m); > sqrt(outer(sq,sq,"+") - 2*mtm)} There are two reasons why I didn't use this

Re: [Rd] dist function in R is very slow

2017-06-17 Thread Moshe Olshansky via R-devel
of magnitude faster than dist). From: Stefan Evert To: Moshe Olshansky Cc: R-devel Mailing List Sent: Sunday, 18 June 2017, 2:33 Subject: Re: [Rd] dist function in R is very slow > On 17 Jun 2017, at 08:47, Moshe Olshansky via R-devel > wrote: > > I am visualising h

Re: [Rd] dist function in R is very slow

2017-06-17 Thread Stefan Evert
> On 17 Jun 2017, at 08:47, Moshe Olshansky via R-devel > wrote: > > I am visualising high dimensional genomic data and for this purpose I need to > compute pairwise distances between many points in a high-dimensional space > (say I have a matrix of 5,000 rows and 20,000 columns, so the resul

[Rd] dist function in R is very slow

2017-06-17 Thread Moshe Olshansky via R-devel
Dear R developers, I am visualising high dimensional genomic data and for this purpose I need to compute pairwise distances between many points in a high-dimensional space (say I have a matrix of 5,000 rows and 20,000 columns, so the result is a 5,000x5,000 matrix or it's upper diagonal).Computi