Topic List | Page List: 1 |
---|---|
Topic | Has anyone here ever worked with R? |
jramirez23 09/13/18 12:35:11 AM #14: | Quick way: j = rep(NA, 1000) j is a vector with 1000 entries, and it starts with all of them being garbage (NA). Then inside the for loop it populates all entries of j with the number 10. You would want to change the line inside the loop to something like j[i] = mean(sample(1:50, 20)) Then, if you wanted to output the mean of the 135th sample you took, you just type j[135] to see what number that entry has. --- I consider it completely unimportant who in the party will vote, or how; but what is extraordinarily important is this who will count the votes, and how. ... Copied to Clipboard! |
Topic List | Page List: 1 |