Hees
Hees

Reputation: 111

difference for large vector in R

I'm trying to figure out how to calculate the difference between any two numbers in an array containing more than 20000 numbers. I used dist() and got a matrix, but the matrix is too big and in too much memory for the matrix to be generated. Is there any other way to do this? Speed up the calculation or be able to store it temporarily on the hard disk?

for example

data <- rnorm(20000)
mat <- dist(data)

Best wishes,

Hees

Upvotes: 0

Views: 14

Answers (0)

Related Questions