Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在不使用 R 重复数字的情况下随机化以下矩阵?
g=sample(1:28, 28), replace=T) HW=matrix(g, ncol=4, byrow=T) HW=as.table(HW) HW
看起来您目前正在更换样品。关闭它应该会给你你想要的行为:
g = sample(1:28, 28, replace=F)