dimanche 16 août 2015

R Random Shuffle Game

I'm new to R. I have to create two stacks of 15 blocks each. The blocks have to be shuffled at random (between the stacks) 15 or N times. After this, the number of blocks on each stack has to be counted. So, I start with 15 each and could end with 10 on the one stack and 20 on the other etc. I'm assuming I will have to use for loops and matrices or vectors, but I'm not sure how to shuffle the "blocks" between stacks. Any help would be very much appreciated!




Aucun commentaire:

Enregistrer un commentaire