Re: [R] Randomly rearranging elements of sets

2010-01-27 Thread Barry Rowlingson
On Wed, Jan 27, 2010 at 11:11 PM, Rolf Turner wrote: > > ?sample > And/Or read Knuth. Does this sound like a homework problem? -- blog: http://geospaced.blogspot.com/ web: http://www.maths.lancs.ac.uk/~rowlings web: http://www.rowlingson.com/ twitter: http://twitter.com/geospacedman pics: ht

Re: [R] Randomly rearranging elements of sets

2010-01-27 Thread Rolf Turner
?sample On 28/01/2010, at 12:06 PM, jshort wrote: Hi I've recently been trying to solve some probability questions in R, but am having trouble. This is one question thats been causing some hair loss: Given the set of integers S = {1,2,3,4,5,6,7,8,9,10}, create a function F(S) that u

[R] Randomly rearranging elements of sets

2010-01-27 Thread jshort
Hi I've recently been trying to solve some probability questions in R, but am having trouble. This is one question thats been causing some hair loss: Given the set of integers S = {1,2,3,4,5,6,7,8,9,10}, create a function F(S) that uniformly and randomly rearranges these integers. For exampl