I have a matrix with 14 samples and I want randomly make sub-matrix with 5 samples like 20 times and make a graph each time!
I have tried for loop but didn't work so do you have any Idea?
#-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')
What I want at end 20 martrix r1 to r20 and their graphed, preferably in a multi-plot!