Efficient Way to Convert Vector of Distances to Distance Object in R (ideally without creating a full distance matrix)
问题 I have a vector of distances which I get from some other procedure and want to convert it to a dist object in the R language . Below I give an example how such a vector looks like : distVector is computed in the same way said other procedure computes the distance vector. Ideally, I would like to transform this vector into a distance matrix ( dist object) without wasting resources. I think I could just transform it to a matrix by copying it as upper triangular and lower triangular matrix,