I am working on R to compute the distance matrix for a large matrix. Matrix has 39900 rows and 1990 columns:
set.seed(123)
#Matrix
M <- matrix(rnorm(39900*1990),nrow = 39900,ncol = 1990)
The issue appears when I want to compute the distance matrix:
#Distance
d <- dist(M,method = 'euclidean')
Having a computer with icore3 processor and 8GB ram using R 64 bits, it has elapsed more than 24 hours and the matrix has not been computed yet.
Is there any way to boost the computing maybe using Rcpp
or other method? I need to obtain the distance matrix and other solutions in this site have not contributed to solve the problem.