Re: [R] Sampling with conditions

2011-11-08 Thread SarahJoyes
Dan Nordlund, Dan (DSHS/RDA) wrote: > >> -Original Message- >> From: r-help-bounces@ [mailto:r-help-bounces@r- >> project.org] On Behalf Of SarahJoyes >> Sent: Tuesday, November 08, 2011 5:57 AM >> To: r-help@ >> Subject: Re: [R] Sampling with c

Re: [R] Sampling with conditions

2011-11-08 Thread Dennis Murphy
-Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >> project.org] On Behalf Of SarahJoyes >> Sent: Tuesday, November 08, 2011 5:57 AM >> To: r-help@r-project.org >> Subject: Re: [R] Sampling with conditions >> >> Tha

Re: [R] Sampling with conditions

2011-11-08 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of SarahJoyes > Sent: Tuesday, November 08, 2011 5:57 AM > To: r-help@r-project.org > Subject: Re: [R] Sampling with conditions > > That is exactly what I

Re: [R] Sampling with conditions

2011-11-08 Thread SarahJoyes
That is exactly what I want, and it's so simple! Thanks so much! -- View this message in context: http://r.789695.n4.nabble.com/Sampling-with-conditions-tp4014036p4016050.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-projec

Re: [R] Sampling with conditions

2011-11-08 Thread SarahJoyes
Sorry about being confusing, I have so many loops in loops and ifelses that I get mixed up sometimes, it was just a typo, it was supposed to be "for(i in 1:5)" Sorry, Thanks for you help! SJ -- View this message in context: http://r.789695.n4.nabble.com/Sampling-with-conditions-tp4014036p40

Re: [R] Sampling with conditions

2011-11-08 Thread Ted Harding
[Yet another correction -- this one is important. I start from scratch this time] On 07-Nov-11 22:22:54, SarahJoyes wrote: > Hey everyone, > I am at best, an amateur user of R, but I am stuck on how > to set-up the following situation. > I am trying to select a random sample of numbers from 0 t

Re: [R] Sampling with conditions

2011-11-07 Thread Ted Harding
[Correction below (I was writing too late at night ... ] On 08-Nov-11 00:25:57, Ted Harding wrote: > On 07-Nov-11 22:22:54, SarahJoyes wrote: >> Hey everyone, >> I am at best, an amateur user of R, but I am stuck on how >> to set-up the following situation. >> I am trying to select a random samp

Re: [R] Sampling with conditions

2011-11-07 Thread Ted Harding
On 07-Nov-11 22:22:54, SarahJoyes wrote: > Hey everyone, > I am at best, an amateur user of R, but I am stuck on how > to set-up the following situation. > I am trying to select a random sample of numbers from 0 to 10 > and insert them into the first column of a matrix (which will > used later in

Re: [R] Sampling with conditions

2011-11-07 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of SarahJoyes > Sent: Monday, November 07, 2011 2:23 PM > To: r-help@r-project.org > Subject: [R] Sampling with conditions > > Hey everyone, > I am at best, an amateur user of R, but

Re: [R] Sampling with conditions

2011-11-07 Thread Weidong Gu
Not sure this is valid that you can have 9 random samples out of 10, but the last one has to be fixed to meet the restraint, sum=10. Weidong On Mon, Nov 7, 2011 at 5:22 PM, SarahJoyes wrote: > Hey everyone, > I am at best, an amateur user of R, but I am stuck on how to set-up the > following sit