如何在r中使用for循环自举矩阵?

时间:2019-01-12 18:58:47

标签: r for-loop

我有一个包含14个样本的矩阵,我想随机制作5个样本的子矩阵(例如20次),并每次绘制一个图形!

我已经尝试过循环,但是没有用,所以您有任何想法吗?

#-select random samples
r1 <- sample(counts, 5)

#-add tolal count
r1$total <- cbind(rowSums(r1))
olaps <- count(r1, "total")
olaps <- olaps[-1,]
x = colnames(r1[1:5])
plot(olaps,type='b')

我想在20末尾从r1到r20以及它们的图形显示,最好是在多图中!

0 个答案:

没有答案
相关问题