I want to generate 10 times 20 random numbers between 1 and 100. The final matrix therefore should include 200 numbers in total. This my way, how I tried to solve it:
x <- 10
N <- 20
A <- matrix()
for (i in 1:x) {
A[i] <- sample(1:100, N, FALSE)
}
A
It results, that something seems to be wrong with A.
Aucun commentaire:
Enregistrer un commentaire