假设我们有这些对象:
distM_ref1_matrix <- dist(cbind(distM_ref1$x, distM_ref1$y))
distM_ref2_matrix <- dist(cbind(distM_ref2$x, distM_ref2$y))
distM_ref3_matrix <- dist(cbind(distM_ref3$x, distM_ref3$y))
distM_ref4_matrix <- dist(cbind(distM_ref4$x, distM_ref4$y))
distM_ref5_matrix <- dist(cbind(distM_ref5$x, distM_ref5$y))
distM_ref6_matrix <- dist(cbind(distM_ref6$x, distM_ref6$y))
distM_ref7_matrix <- dist(cbind(distM_ref7$x, distM_ref7$y))
distM_ref8_matrix <- dist(cbind(distM_ref8$x, distM_ref8$y))
distM_ref9_matrix <- dist(cbind(distM_ref9$x, distM_ref9$y))
我有两个问题:
我认为第二个问题的答案在某种程度上就像这个代码:
mean(c(distM_ref[1:9]_matrix))