以下循环运行时间太长(2 分钟/迭代)tumor_signals 大小为 950000x422 normal_signals 大小为 950000x772 有关如何加快它的任何想法?
for(i in 1:ncol(tumor_signals)){
x <- as.vector(tumor_signals[,i])
print("Assigned x")
y <- t((t(normal_signals) - x)^2)
print("assigned y")
y <- t(sqrt(colSums(y)))
print("done")
#all_distance <- cbind(all_distance,matrix(distance))
print(i)
}