Re: [R] sampling from a list of values while excluding one

2008-07-21 Thread Juliane Struve
This works great, thank you for your help ! Dr. Juliane Struve Environmental Scientist 10, Lynwood Crescent Sunningdale SL5 0BL 01344 620811 --- On Mon, 21/7/08, jim holtman <[EMAIL PROTECTED]> wrote: > From: jim holtman <[EMAIL PROTECTED]> > Subject: Re: [R] sampling fro

Re: [R] sampling from a list of values while excluding one

2008-07-21 Thread jim holtman
Here is one way of doing it by removing the element from the vector > # exclude the 3rd element of the vector > sample((1:10)[-3], 10, TRUE) [1] 4 5 7 10 2 10 10 7 7 1 > On Mon, Jul 21, 2008 at 5:10 AM, Juliane Struve <[EMAIL PROTECTED]> wrote: > Dear list, > > > I am trying to sample fr

[R] sampling from a list of values while excluding one

2008-07-21 Thread Juliane Struve
Dear list, I am trying to sample from a list of integers 1:10, but need to exclude one of them. The one to be excluded is a variable called "number" and can take values 1:10. The line below does not work, but shows what I am trying to do. Would somebody be able to help me with the syntax ? an